summaryrefslogtreecommitdiff
path: root/libslab
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2018-12-31 17:45:12 +0800
committerraveit65 <[email protected]>2019-01-01 16:37:45 +0100
commit56c186771c59b5f151477db84a9c23de0fa95baf (patch)
tree3f3c2600f0a480825419490b37761896ae7f094f /libslab
parentbdd05a6d0e9ea3c8930dfc7b3db6b0413919f179 (diff)
downloadmate-control-center-56c186771c59b5f151477db84a9c23de0fa95baf.tar.bz2
mate-control-center-56c186771c59b5f151477db84a9c23de0fa95baf.tar.xz
Fixed number of cols error after reload menus.
After install/uninstall applications, each category of applications display as one long line.
Diffstat (limited to 'libslab')
-rw-r--r--libslab/app-resizer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libslab/app-resizer.c b/libslab/app-resizer.c
index d5b27dc6..00c0cd2a 100644
--- a/libslab/app-resizer.c
+++ b/libslab/app-resizer.c
@@ -136,11 +136,11 @@ calculate_num_cols (AppResizer * resizer, gint avail_width)
GtkTable *table = GTK_TABLE (resizer->cached_tables_list->data);
GList *children = gtk_container_get_children (GTK_CONTAINER (table));
GtkWidget *table_element = GTK_WIDGET (children->data);
- GtkAllocation allocation;
+ gint natural_width;
g_list_free (children);
- gtk_widget_get_allocation (table_element, &allocation);
- resizer->cached_element_width = allocation.width;
+ gtk_widget_get_preferred_width (table_element, NULL, &natural_width);
+ resizer->cached_element_width = natural_width;
resizer->cached_table_spacing = gtk_table_get_default_col_spacing (table);
}