From 4ce5e51690756326965dc76bb733dd100d843557 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Wed, 15 Jan 2014 22:29:52 +0100 Subject: [gtkui] another fix to column autoresizing, now should work in gnome shell as well --- plugins/gtkui/ddblistview.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'plugins/gtkui') diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index 8296c192..af2e65e5 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -2435,20 +2435,9 @@ ddb_listview_header_configure_event (GtkWidget *widget, void ddb_listview_lock_columns (DdbListview *lv, gboolean lock) { lv->lock_columns = lock; - if (lock == 0) { - GtkAllocation a; - gtk_widget_get_allocation (GTK_WIDGET (lv), &a); - if (deadbeef->conf_get_int ("gtkui.autoresize_columns", 0)) { - DdbListviewColumn *c; - if (!lv->col_autoresize) { - for (c = lv->columns; c; c = c->next) { - c->fwidth = (float)c->width / (float)a.width; - } - lv->col_autoresize = 1; - } - } - lv->header_width = a.width; - } + + // NOTE: at this point, it's still not guaranteed that the allocation contains + // the final size, so we don't calc initial autoresize state here } -- cgit v1.2.3