aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 14:37:33 -0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 14:40:04 -0200
commit8956d6f5df867e911203e06db97313f30f57a98b (patch)
tree09bfcfec22cb8b4980a47965af26743ebc8d1280 /src
parent5c4c0630ea2da301672b4a00f7913d7fc75d5aaf (diff)
camorama-window: ensure that windows will be resized after controls code
As controls will be shown or hidden depending if they're available or not and if the controls are visible or not, call resize, in order to ensure that any empty vertical space at the end of the window will be cleaned up. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/camorama-window.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 07261b7..298e56d 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -230,12 +230,6 @@ void load_interface(cam_t *cam)
g_signal_connect_swapped(treeview, "popup-menu",
G_CALLBACK(treeview_popup_menu_cb), cam);
- if (cam->show_adjustments == FALSE) {
- gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,
- "adjustments_table")));
-
- gtk_window_resize(GTK_WINDOW(window), 320, 240);
- }
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtk_builder_get_object(cam->xml, "showadjustment_item")),
cam->show_adjustments);
if (cam->show_effects == FALSE) {
@@ -346,6 +340,14 @@ void load_interface(cam_t *cam)
(int)(cam->whiteness / 256));
}
+ if (cam->show_adjustments == FALSE)
+ gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,
+ "adjustments_table")));
+
+ // Ensure that windows will be resized due to the controls
+ gtk_window_resize(GTK_WINDOW(window), 320, 240);
+
+
/* buttons */
g_signal_connect(gtk_builder_get_object(cam->xml, "quit"), "activate",
G_CALLBACK(on_quit_activate), cam);

Privacy Policy