Skip to content

Commit 383d3da

Browse files
yetistraveit65
authored andcommitted
Fixed number of cols error after reload menus.
After install/uninstall applications, each category of applications display as one long line.
1 parent 512b446 commit 383d3da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libslab/app-resizer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ calculate_num_cols (AppResizer * resizer, gint avail_width)
136136
GtkTable *table = GTK_TABLE (resizer->cached_tables_list->data);
137137
GList *children = gtk_container_get_children (GTK_CONTAINER (table));
138138
GtkWidget *table_element = GTK_WIDGET (children->data);
139-
GtkAllocation allocation;
139+
gint natural_width;
140140
g_list_free (children);
141141

142-
gtk_widget_get_allocation (table_element, &allocation);
143-
resizer->cached_element_width = allocation.width;
142+
gtk_widget_get_preferred_width (table_element, NULL, &natural_width);
143+
resizer->cached_element_width = natural_width;
144144
resizer->cached_table_spacing = gtk_table_get_default_col_spacing (table);
145145
}
146146

0 commit comments

Comments
 (0)