[Xfce4-commits] [panel-plugins/xfce4-time-out-plugin] 01/02: Make time out plugin respect panel icon size (Bug #15839)
noreply at xfce.org
noreply at xfce.org
Tue Aug 20 03:17:51 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e 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 panel-plugins/xfce4-time-out-plugin.
commit 4d21f4027bb549ae51dbe14c80079b17212476b9
Author: Glen Whitney <gwhitney at post.harvard.edu>
Date: Sat Aug 17 13:43:16 2019 -0700
Make time out plugin respect panel icon size (Bug #15839)
Since Xfce 4.14, each panel specifies an overall icon-size policy for all
components therein. This change causes the timeout plugin to respect the panel
setting
---
panel-plugin/time-out.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/panel-plugin/time-out.c b/panel-plugin/time-out.c
index 83da864..d537d87 100644
--- a/panel-plugin/time-out.c
+++ b/panel-plugin/time-out.c
@@ -203,7 +203,11 @@ time_out_new (XfcePanelPlugin *plugin)
/* Create time out icon */
time_out->panel_icon = gtk_image_new_from_icon_name ("xfce4-time-out-plugin", GTK_ICON_SIZE_DIALOG);
+#if LIBXFCE4PANEL_CHECK_VERSION(4, 14, 0)
+ gtk_image_set_pixel_size (GTK_IMAGE (time_out->panel_icon), xfce_panel_plugin_get_icon_size (time_out->plugin));
+#else
gtk_image_set_pixel_size (GTK_IMAGE (time_out->panel_icon), xfce_panel_plugin_get_size (time_out->plugin) - 8);
+#endif
gtk_box_pack_start (GTK_BOX (time_out->hvbox), time_out->panel_icon, TRUE, TRUE, 0);
gtk_widget_show (time_out->panel_icon);
@@ -382,7 +386,12 @@ time_out_size_changed (XfcePanelPlugin *plugin,
orientation = xfce_panel_plugin_get_orientation (plugin);
/* Update icon size */
+#if LIBXFCE4PANEL_CHECK_VERSION(4, 14, 0)
+ gtk_image_set_pixel_size (GTK_IMAGE (time_out->panel_icon),
+ xfce_panel_plugin_get_icon_size(time_out->plugin));
+#else
gtk_image_set_pixel_size (GTK_IMAGE (time_out->panel_icon), size - 8);
+#endif
/* Update widget size */
if (orientation == GTK_ORIENTATION_HORIZONTAL)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list