From 92b88807a8e6562eaf8110dc9c97a4142fd0fc4c Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Thu, 6 Jun 2024 13:36:05 -0400 Subject: [PATCH] Don't force an icon's allocation to match the panel height. This prevents excessive spacing between icons when the icon size is significantly smaller than the panel height. --- plugin/xapp-status-plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/xapp-status-plugin.c b/plugin/xapp-status-plugin.c index deb3330..8eb0140 100644 --- a/plugin/xapp-status-plugin.c +++ b/plugin/xapp-status-plugin.c @@ -557,6 +557,7 @@ xapp_status_plugin_size_changed (XfcePanelPlugin *panel_plugin, GHashTableIter iter; gpointer key, value; + GtkOrientation orientation = xfce_panel_plugin_get_orientation (panel_plugin); gint max_size; max_size = size / xfce_panel_plugin_get_nrows (panel_plugin); @@ -568,8 +569,8 @@ xapp_status_plugin_size_changed (XfcePanelPlugin *panel_plugin, StatusIcon *icon = STATUS_ICON (value); gtk_widget_set_size_request (GTK_WIDGET (icon), - max_size, - max_size); + orientation == GTK_ORIENTATION_HORIZONTAL ? -1 : max_size, + orientation == GTK_ORIENTATION_VERTICAL ? -1 : max_size); status_icon_set_size (icon, get_color_icon_size (applet),