[Xfce4-commits] <xfce4-battery-plugin:master> Making the icon size match sizes of other icons in Xfce panel 4.9+.

Landry Breuil noreply at xfce.org
Sat Apr 14 15:48:01 CEST 2012


Updating branch refs/heads/master
         to baaedc27dcb5d9d0a9df0e43e71cffe2fb380d6f (commit)
       from 7a65d7ebcf931dac9b8a92ce3059e3c26827d670 (commit)

commit baaedc27dcb5d9d0a9df0e43e71cffe2fb380d6f
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Thu Jan 26 23:39:48 2012 +0900

    Making the icon size match sizes of other icons in Xfce panel 4.9+.
    
    Signed-off-by: Landry Breuil <landry at xfce.org>

 panel-plugin/battery.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index 9e51ad1..e4cfa46 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -626,7 +626,13 @@ battmon_icon (t_battmon *battmon)
 
     /* panel info */
     orientation = xfce_panel_plugin_get_orientation (battmon->plugin);
+
+#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+    size = xfce_panel_plugin_get_size (battmon->plugin);
+    size /= xfce_panel_plugin_get_nrows (battmon->plugin) - 6;
+#else
     size = xfce_panel_plugin_get_size (battmon->plugin) - 6;
+#endif
 
         /* icon size is 41x64px */
     if (orientation == GTK_ORIENTATION_HORIZONTAL)


More information about the Xfce4-commits mailing list