summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <[email protected]>2011-02-23 00:49:33 +0100
committerinfirit <[email protected]>2015-07-14 13:08:19 +0200
commitd6441581b88fc1fcd5da07bcb485ac6a246f3a28 (patch)
tree0f35ecbfc802ae8e14a6e5937b5516e668438dab
parent88730a11adcbd075071dafa61e1633f2ad7a0926 (diff)
downloadmate-panel-d6441581b88fc1fcd5da07bcb485ac6a246f3a28.tar.bz2
mate-panel-d6441581b88fc1fcd5da07bcb485ac6a246f3a28.tar.xz
na: Add icon-padding style property to NaTrayApplet to set padding
It can be used this way: NaTrayApplet { -NaTrayApplet-icon-padding: 6; } https://bugzilla.gnome.org/show_bug.cgi?id=583273
-rw-r--r--applets/notification_area/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 853dad3f..01f7f066 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -122,6 +122,7 @@ na_tray_applet_style_updated (GtkWidget *widget)
GdkColor error;
GdkColor warning;
GdkColor success;
+ gint padding;
GTK_WIDGET_CLASS (na_tray_applet_parent_class)->style_updated (widget);
@@ -143,6 +144,10 @@ na_tray_applet_style_updated (GtkWidget *widget)
success = fg;
na_tray_set_colors (applet->priv->tray, &fg, &error, &warning, &success);
+
+ gtk_widget_style_get (widget, "icon-padding", &padding, NULL);
+
+ na_tray_set_padding (applet->priv->tray, padding);
}
static void
@@ -212,6 +217,14 @@ na_tray_applet_class_init (NaTrayAppletClass *class)
applet_class->change_background = na_tray_applet_change_background;
applet_class->change_orient = na_tray_applet_change_orient;
+ gtk_widget_class_install_style_property (
+ widget_class,
+ g_param_spec_int ("icon-padding",
+ "Padding around icons",
+ "Padding that should be put around icons, in pixels",
+ 0, G_MAXINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
g_type_class_add_private (class, sizeof (NaTrayAppletPrivate));
}