[gtk+] placesview: Simplify button construction
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] placesview: Simplify button construction
- Date: Thu, 2 Mar 2017 14:29:41 +0000 (UTC)
commit dc511a38d0956ad0edd008b0acb228eea0aafd01
Author: Timm Bäder <mail baedert org>
Date: Thu Mar 2 14:06:01 2017 +0100
placesview: Simplify button construction
gtk/gtkplacesview.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 8edeab0..7d4a6dd 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -587,15 +587,12 @@ populate_servers (GtkPlacesView *view)
gtk_container_add (GTK_CONTAINER (grid), label);
/* remove button */
- button = gtk_button_new ();
+ button = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_widget_set_halign (button, GTK_ALIGN_END);
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- gtk_style_context_add_class (gtk_widget_get_style_context (button), "image-button");
gtk_style_context_add_class (gtk_widget_get_style_context (button), "sidebar-button");
gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 2);
- gtk_container_add (GTK_CONTAINER (button),
- gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON));
gtk_container_add (GTK_CONTAINER (row), grid);
gtk_container_add (GTK_CONTAINER (priv->recent_servers_listbox), row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]