Commit f5ef20a3 authored by Adrien Dorsaz's avatar Adrien Dorsaz

rep_budget_balance.c: on dialog resize, keep the same height, just update the width

parent feab911f
Pipeline #210 canceled with stages
......@@ -844,12 +844,12 @@ gint w, h;
gtk_tree_view_set_model(GTK_TREE_VIEW(budget), model);
gtk_tree_view_expand_all(GTK_TREE_VIEW(budget));
// Resize the window to get natural width for the dialog
// Resize the window to get natural width for the dialog and keep the current height
scrolledwindow = gtk_widget_get_parent(GTK_WIDGET(budget));
g_object_ref(budget); // Add temporary a manual ref to keep the view alive
gtk_container_remove(GTK_CONTAINER(scrolledwindow), budget);
gtk_window_get_size(GTK_WINDOW(GLOBALS->mainwindow), &w, &h);
gtk_window_resize (GTK_WINDOW(data->window), 1, h * 0.8);
gtk_window_get_size(GTK_WINDOW(data->window), &w, &h);
gtk_window_resize (GTK_WINDOW(data->window), 1, h);
gtk_container_add(GTK_CONTAINER(scrolledwindow), budget);
g_object_unref(budget);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment