diff options
author | Ryan Lortie <[email protected]> | 2011-03-29 23:41:17 +0530 |
---|---|---|
committer | infirit <[email protected]> | 2015-07-14 13:08:19 +0200 |
commit | e9c7cb073d30e30aeac0a2e9fe3c21f1d0f49cd0 (patch) | |
tree | a03cf5f3b1cd91ce3042fba7c5f32f48c6cf2fea /applets/notification_area/main.c | |
parent | be334f90f603df90bee15d43f5f67a052fa07ff2 (diff) | |
download | mate-panel-e9c7cb073d30e30aeac0a2e9fe3c21f1d0f49cd0.tar.bz2 mate-panel-e9c7cb073d30e30aeac0a2e9fe3c21f1d0f49cd0.tar.xz |
notification applet: support fixed-sized icons
Add a new _NET_SYSTEM_TRAY_ICON_SIZE property that is set to the value
of the "icon-size" style property. The result is that all icons in the
tray will be hinted to draw themselves with exactly this pixel size
(16x16, for example).
Bug #645232
Conflicts:
applets/notification_area/na-tray-manager.c
applets/notification_area/na-tray-manager.h
applets/notification_area/na-tray.h
Diffstat (limited to 'applets/notification_area/main.c')
-rw-r--r-- | applets/notification_area/main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c index 01f7f066..68f9600f 100644 --- a/applets/notification_area/main.c +++ b/applets/notification_area/main.c @@ -123,6 +123,7 @@ na_tray_applet_style_updated (GtkWidget *widget) GdkColor warning; GdkColor success; gint padding; + gint icon_size; GTK_WIDGET_CLASS (na_tray_applet_parent_class)->style_updated (widget); @@ -146,8 +147,10 @@ na_tray_applet_style_updated (GtkWidget *widget) 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); + + gtk_widget_style_get (widget, "icon-size", &icon_size, NULL); + na_tray_set_icon_size (applet->priv->tray, icon_size); } static void @@ -225,6 +228,14 @@ na_tray_applet_class_init (NaTrayAppletClass *class) 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + gtk_widget_class_install_style_property ( + widget_class, + g_param_spec_int ("icon-size", + "Icon size", + "If non-zero, hardcodes the size of the icons in pixels", + 0, G_MAXINT, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_type_class_add_private (class, sizeof (NaTrayAppletPrivate)); } |