[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 19/20: Make panel button square only if single row and title hidden.

noreply at xfce.org noreply at xfce.org
Thu Feb 6 12:03:36 CET 2020


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 a46a3f558510c64eef304f533b318c6f8489a43e
Author: Graeme Gott <graeme at gottcode.org>
Date:   Wed Feb 5 16:54:39 2020 -0500

    Make panel button square only if single row and title hidden.
---
 panel-plugin/plugin.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 046acde..8f02383 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -476,15 +476,17 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
 		}
 	}
 
-	if (wm_settings->button_title_visible)
+	// Make panel button square only if single row and title hidden
+	if (!wm_settings->button_title_visible && (wm_settings->button_single_row || (xfce_panel_plugin_get_nrows(m_plugin) == 1)))
 	{
-		gtk_widget_set_size_request(m_button, -1, -1);
+		gtk_widget_set_size_request(m_button, size, size);
 	}
 	else
 	{
-		gtk_widget_set_size_request(m_button, size, size);
+		gtk_widget_set_size_request(m_button, -1, -1);
 	}
 
+	// Use single panel row if requested and title hidden
 	if (wm_settings->button_title_visible || !wm_settings->button_single_row)
 	{
 		xfce_panel_plugin_set_small(m_plugin, false);

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


More information about the Xfce4-commits mailing list