diff options
author | 2012-08-16 17:41:07 +0200 | |
---|---|---|
committer | 2012-08-16 17:41:07 +0200 | |
commit | f936dc17363dc6ef9fb518bc5b115b0ae43e8fdc (patch) | |
tree | 3a7c7adaa942c3dbb43e869f032695d63c52ded4 /plugins/gtkui/ddblistview.c | |
parent | db91e6e374e7f96e2576d111ac6562493bd397a0 (diff) |
gtkui: fixed column autoresize maximized bug
Diffstat (limited to 'plugins/gtkui/ddblistview.c')
-rw-r--r-- | plugins/gtkui/ddblistview.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index 04bb8ae1..38b23589 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -2355,16 +2355,19 @@ ddb_listview_header_configure_event (GtkWidget *widget, gtk_widget_set_size_request (widget, -1, height); } - if (ps->header_width == 0) { - ps->header_width = a.width; + if (gtkui_init_complete) { + if (ps->header_width != a.width && deadbeef->conf_get_int ("gtkui.autoresize_columns", 0)) { + float ratio = (float)a.width / ps->header_width; + ps->header_width = a.width; + struct _DdbListviewColumn *c; + for (c = ps->columns; c; c = c->next) { + c->width *= ratio; + } + ps->binding->columns_changed (ps); + } } - else if (ps->header_width != a.width && deadbeef->conf_get_int ("gtkui.autoresize_columns", 0)) { - float ratio = (float)a.width / ps->header_width; + else { ps->header_width = a.width; - struct _DdbListviewColumn *c; - for (c = ps->columns; c; c = c->next) { - c->width *= ratio; - } } return FALSE; |