Fix usage of constrain-width attribute of PanelIconGrid in size_allocate method.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Mon, 18 Aug 2014 19:00:22 +0000 (22:00 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Mon, 18 Aug 2014 19:25:17 +0000 (22:25 +0300)
src/icon-grid.c

index e51a05b..36378bd 100644 (file)
@@ -122,7 +122,7 @@ static void panel_icon_grid_size_allocate(GtkWidget *widget,
     ig->constrained_child_width = ig->child_width;
     if ((ig->columns != 0) && (ig->rows != 0) && (allocation->width > 1))
     {
     ig->constrained_child_width = ig->child_width;
     if ((ig->columns != 0) && (ig->rows != 0) && (allocation->width > 1))
     {
-        if (req.width > allocation->width)
+        if (req.width > allocation->width && ig->constrain_width)
             ig->constrained_child_width = child_width = (allocation->width + ig->spacing - 2 * border) / ig->columns - ig->spacing;
         if (ig->orientation == GTK_ORIENTATION_HORIZONTAL && req.height < allocation->height)
             child_height = (allocation->height + ig->spacing - 2 * border) / ig->rows - ig->spacing;
             ig->constrained_child_width = child_width = (allocation->width + ig->spacing - 2 * border) / ig->columns - ig->spacing;
         if (ig->orientation == GTK_ORIENTATION_HORIZONTAL && req.height < allocation->height)
             child_height = (allocation->height + ig->spacing - 2 * border) / ig->rows - ig->spacing;