[Xfce4-commits] [apps/xfce4-notifyd] 03/04: Fix previous commit
noreply at xfce.org
noreply at xfce.org
Tue Nov 7 23:47:16 CET 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-notifyd.
commit 1f19fe530f4748eebda2a874c1ff50d59185e176
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Fri Nov 3 00:55:54 2017 +0100
Fix previous commit
---
panel-plugin/notification-plugin.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/panel-plugin/notification-plugin.c b/panel-plugin/notification-plugin.c
index d672846..ae22be6 100644
--- a/panel-plugin/notification-plugin.c
+++ b/panel-plugin/notification-plugin.c
@@ -280,9 +280,9 @@ notification_plugin_size_changed (XfcePanelPlugin *plugin,
icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (plugin));
#else
/* Calculate the size of the widget because the theme can override it */
- context = gtk_widget_get_style_context (GTK_WIDGET (button));
- gtk_style_context_get_padding (context, gtk_widget_get_state_flags (GTK_WIDGET (button)), &padding);
- gtk_style_context_get_border (context, gtk_widget_get_state_flags (GTK_WIDGET (button)), &border);
+ context = gtk_widget_get_style_context (GTK_WIDGET (notification_plugin->button));
+ gtk_style_context_get_padding (context, gtk_widget_get_state_flags (GTK_WIDGET (notification_plugin->button)), &padding);
+ gtk_style_context_get_border (context, gtk_widget_get_state_flags (GTK_WIDGET (notification_plugin->button)), &border);
xthickness = padding.left + padding.right + border.left + border.right;
ythickness = padding.top + padding.bottom + border.top + border.bottom;
@@ -292,22 +292,17 @@ notification_plugin_size_changed (XfcePanelPlugin *plugin,
/* Since symbolic icons are usually only provided in 16px we
* try to be clever and use size steps */
if (width <= 21)
- button->priv->panel_icon_width = 16;
+ icon_size = 16;
else if (width >=22 && width <= 29)
- button->priv->panel_icon_width = 24;
+ icon_size = 24;
else if (width >= 30 && width <= 40)
- button->priv->panel_icon_width = 32;
+ icon_size = 32;
else
- button->priv->panel_icon_width = width;
+ icon_size = width;
#endif
- /* resize the plugin */
- gtk_widget_set_size_request (GTK_WIDGET (plugin), size, size);
gtk_image_set_pixel_size (GTK_IMAGE (notification_plugin->image), icon_size);
- /* resize the plugin button too */
- gtk_widget_set_size_request (GTK_WIDGET (notification_plugin), -1, -1);
-
return TRUE;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list