Skip to content

Commit

Permalink
Don't force an icon's allocation to match the panel height.
Browse files Browse the repository at this point in the history
This prevents excessive spacing between icons when the icon size
is significantly smaller than the panel height.
  • Loading branch information
mtwebster committed Jun 6, 2024
1 parent 339443c commit 92b8880
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/xapp-status-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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),
Expand Down

0 comments on commit 92b8880

Please sign in to comment.