From 29506ca7fb06f7579be05ea6cc15ab782cb44347 Mon Sep 17 00:00:00 2001 From: Graeme Gott Date: Fri, 23 Aug 2019 08:33:52 -0400 Subject: [PATCH] Adjust plugin icon size for multi-row panel. --- libxfce4panel/xfce-panel-plugin.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c index 436403c7..72321342 100644 --- a/libxfce4panel/xfce-panel-plugin.c +++ b/libxfce4panel/xfce-panel-plugin.c @@ -2099,7 +2099,9 @@ xfce_panel_plugin_get_icon_size (XfcePanelPlugin *plugin) /* 0 is handled as 'automatic sizing' */ if (plugin->priv->icon_size == 0) { - width = xfce_panel_plugin_get_size (plugin) / xfce_panel_plugin_get_nrows (plugin); + width = xfce_panel_plugin_get_size (plugin); + if (xfce_panel_plugin_get_small (plugin)) + width /= xfce_panel_plugin_get_nrows (plugin); /* Since symbolic icons are usually only provided in 16px we * try to be clever and use size steps. @@ -2119,7 +2121,10 @@ xfce_panel_plugin_get_icon_size (XfcePanelPlugin *plugin) } else { - return plugin->priv->icon_size; + width = plugin->priv->icon_size; + if (!xfce_panel_plugin_get_small (plugin)) + width *= xfce_panel_plugin_get_nrows (plugin); + return width; } } -- 2.23.0