summaryrefslogtreecommitdiff
path: root/applets/notification_area/na-grid.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-12-30 02:26:46 -0500
committerlukefromdc <[email protected]>2018-12-30 20:56:21 +0000
commit9484b053c9857ca7512b7374461c1fec6e246159 (patch)
treeff3a5fd8d87f68db68268af5cde3047f5e63589e /applets/notification_area/na-grid.c
parent4c2319756605f0b30e76832f7dd369cc7c6763eb (diff)
downloadmate-panel-9484b053c9857ca7512b7374461c1fec6e246159.tar.bz2
mate-panel-9484b053c9857ca7512b7374461c1fec6e246159.tar.xz
Tray: Fix too-wide icon spacing after mate-polkit has been used w sni
Note that vertical and horizontal panels require different options in the grid, as "homogenous" is needed in rows for horizontal panels and columns in vertical panels to prevent icon rendering problems including icons growing without limit when the tray is moved from a horizontal to a vertical panel
Diffstat (limited to 'applets/notification_area/na-grid.c')
-rw-r--r--applets/notification_area/na-grid.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/applets/notification_area/na-grid.c b/applets/notification_area/na-grid.c
index 0bad8646..bd87f139 100644
--- a/applets/notification_area/na-grid.c
+++ b/applets/notification_area/na-grid.c
@@ -145,6 +145,8 @@ refresh_grid (NaGrid *self)
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
+ gtk_grid_set_row_homogeneous (GTK_GRID (self), TRUE);
+ gtk_grid_set_column_homogeneous (GTK_GRID (self), FALSE);
rows = MAX (1, allocation.height / self->min_icon_size);
cols = MAX (1, length / rows);
if (length % rows)
@@ -152,6 +154,8 @@ refresh_grid (NaGrid *self)
}
else
{
+ gtk_grid_set_row_homogeneous (GTK_GRID (self), FALSE);
+ gtk_grid_set_column_homogeneous (GTK_GRID (self), TRUE);
cols = MAX (1, allocation.width / self->min_icon_size);
rows = MAX (1, length / cols);
if (length % cols)
@@ -243,6 +247,7 @@ na_grid_init (NaGrid *self)
gtk_grid_set_row_homogeneous (GTK_GRID (self), TRUE);
gtk_grid_set_column_homogeneous (GTK_GRID (self), TRUE);
+
}
static void