[gnome-control-center] network: unfuzzy symbolic buttons and make them square



commit 0969b36a6547669e72164b5f6fc33d08d4acd4b9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Feb 7 16:23:54 2013 -0500

    network: unfuzzy symbolic buttons and make them square
    
    Use the 'image-button' style class to make symbolic buttons square
    (as supported by latest Adwaita), and make sure to use the correct icon
    size for all symbolics to avoid fuzzyness.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693357

 panels/network/connection-editor/ce-page-ip4.c |    3 +++
 panels/network/connection-editor/ce-page-ip6.c |    3 +++
 panels/network/net-device-ethernet.c           |    1 +
 panels/network/net-device-wifi.c               |    1 +
 panels/network/network-ethernet.ui             |    4 ++++
 panels/network/network-vpn.ui                  |    4 ++++
 6 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
index d35f249..b342bdf 100644
--- a/panels/network/connection-editor/ce-page-ip4.c
+++ b/panels/network/connection-editor/ce-page-ip4.c
@@ -212,6 +212,7 @@ add_address_row (CEPageIP4   *page,
         gtk_grid_attach (GTK_GRID (row), widget, 2, 3, 1, 1);
 
         delete_button = gtk_button_new ();
+        gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
         g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
         image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
         gtk_button_set_image (GTK_BUTTON (delete_button), image);
@@ -341,6 +342,7 @@ add_dns_row (CEPageIP4   *page,
         gtk_box_pack_start (GTK_BOX (row), widget, TRUE, TRUE, 0);
 
         delete_button = gtk_button_new ();
+        gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
         g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
         image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
         gtk_button_set_image (GTK_BUTTON (delete_button), image);
@@ -465,6 +467,7 @@ add_route_row (CEPageIP4   *page,
         gtk_grid_attach (GTK_GRID (row), widget, 2, 4, 1, 1);
 
         delete_button = gtk_button_new ();
+        gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
         g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
         image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
         gtk_button_set_image (GTK_BUTTON (delete_button), image);
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index cbad740..ffb0b99 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -214,6 +214,7 @@ add_address_row (CEPageIP6   *page,
         gtk_grid_attach (GTK_GRID (row), widget, 2, 3, 1, 1);
 
         delete_button = gtk_button_new ();
+        gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
         g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
         image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
         gtk_button_set_image (GTK_BUTTON (delete_button), image);
@@ -345,6 +346,7 @@ add_dns_row (CEPageIP6   *page,
         gtk_box_pack_start (GTK_BOX (row), widget, TRUE, TRUE, 0);
 
         delete_button = gtk_button_new ();
+        gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
         g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
         image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
         gtk_button_set_image (GTK_BUTTON (delete_button), image);
@@ -473,6 +475,7 @@ add_route_row (CEPageIP6   *page,
         gtk_grid_attach (GTK_GRID (row), widget, 2, 4, 1, 1);
 
         delete_button = gtk_button_new ();
+        gtk_style_context_add_class (gtk_widget_get_style_context (delete_button), "image-button");
         g_signal_connect (delete_button, "clicked", G_CALLBACK (remove_row), page);
         image = gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
         gtk_button_set_image (GTK_BUTTON (delete_button), image);
diff --git a/panels/network/net-device-ethernet.c b/panels/network/net-device-ethernet.c
index ba9c812..0cd3b14 100644
--- a/panels/network/net-device-ethernet.c
+++ b/panels/network/net-device-ethernet.c
@@ -334,6 +334,7 @@ add_row (NetDeviceEthernet *device, NMConnection *connection)
         image = gtk_image_new_from_icon_name ("emblem-system-symbolic", GTK_ICON_SIZE_MENU);
         gtk_widget_show (image);
         widget = gtk_button_new ();
+        gtk_style_context_add_class (gtk_widget_get_style_context (widget), "image-button");
         gtk_widget_set_margin_left (widget, 12);
         gtk_widget_set_margin_right (widget, 12);
         gtk_widget_set_margin_top (widget, 12);
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 4d9a722..aa8b73d 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1532,6 +1532,7 @@ make_row (GtkSizeGroup   *rows,
                 image = gtk_image_new_from_icon_name ("emblem-system-symbolic", GTK_ICON_SIZE_MENU);
                 gtk_widget_show (image);
                 widget = gtk_button_new ();
+                gtk_style_context_add_class (gtk_widget_get_style_context (widget), "image-button");
                 gtk_widget_set_no_show_all (widget, TRUE);
                 if (!connecting)
                         gtk_widget_show (widget);
diff --git a/panels/network/network-ethernet.ui b/panels/network/network-ethernet.ui
index c67bb35..bd063ff 100644
--- a/panels/network/network-ethernet.ui
+++ b/panels/network/network-ethernet.ui
@@ -5,6 +5,7 @@
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="icon_name">emblem-system-symbolic</property>
+    <property name="icon_size">1</property>
   </object>
   <object class="GtkWindow" id="window_tmp">
     <property name="can_focus">False</property>
@@ -194,6 +195,9 @@
                 <property name="receives_default">True</property>
                 <property name="halign">end</property>
                 <property name="image">image1</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
               </object>
               <packing>
                 <property name="expand">True</property>
diff --git a/panels/network/network-vpn.ui b/panels/network/network-vpn.ui
index 218be57..8a4e9b6 100644
--- a/panels/network/network-vpn.ui
+++ b/panels/network/network-vpn.ui
@@ -322,11 +322,15 @@
                 <property name="vexpand">True</property>
                 <property name="use_underline">True</property>
                 <property name="xalign">1</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
                 <child>
                   <object class="GtkImage" id="image1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="icon_name">emblem-system-symbolic</property>
+                    <property name="icon_size">1</property>
                   </object>
                 </child>
               </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]