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

noreply at xfce.org noreply at xfce.org
Mon Nov 13 15:04:37 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       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-whiskermenu-plugin.

commit baf8c236d8de8e3d10fb03480abb54d16fe4cad4
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