[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 15/17: Use stepped icon sizes for small panels.

noreply at xfce.org noreply at xfce.org
Mon Nov 13 19:39:33 CET 2017


This is an automated email from the git hooks/post-receive script.

g   o   t   t   c   o   d   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       a   n   n   o   t   a   t   e   d       t   a   g       v   2   .   1   .   4   
   in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 720f0ecf095182b7d2629555c2eaa1fa300a294b
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Nov 10 11:53:05 2017 -0500

    Use stepped icon sizes for small panels.
---
 panel-plugin/plugin.cpp | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index ba61828..adf9e12 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -472,7 +472,19 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
 	gint icon_size = xfce_panel_plugin_get_icon_size(m_plugin);
 #else
 	gint icon_size = size / xfce_panel_plugin_get_nrows(m_plugin);
-	icon_size -= 8;
+	icon_size -= 4;
+	if (icon_size < 24)
+	{
+		icon_size = 16;
+	}
+	else if (icon_size < 32)
+	{
+		icon_size = 24;
+	}
+	else if (icon_size < 36)
+	{
+		icon_size = 32;
+	}
 #endif
 	gtk_image_set_pixel_size(m_button_icon, icon_size);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list