aboutsummaryrefslogtreecommitdiffstats
path: root/src/camorama-window.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 13:34:20 -0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 15:05:26 -0200
commit4ee19584c0cf1048d5cc813ec82f9be249411d3f (patch)
tree50f9cbc08cdb8d5f87a733e5671b77a0dcd8d0fd /src/camorama-window.c
parent8956d6f5df867e911203e06db97313f30f57a98b (diff)
Add zoom control
The icon was imported from gnome icon set (https://github.com/GNOME/gnome-icon-theme) before changeset e4fc9dade2d6411173bb84c0f1064eeac0b6a5fb, to ensure that it matches the license of camorama project (GPL 2). Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/camorama-window.c')
-rw-r--r--src/camorama-window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 298e56d..8bebbde 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -313,6 +313,19 @@ void load_interface(cam_t *cam)
gtk_range_set_value((GtkRange *)GTK_WIDGET(gtk_builder_get_object(cam->xml, "color_slider")),
(int)(cam->colour / 256));
}
+ if (cam->zoom < 0) {
+ gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,
+ "zoom_icon")));
+ gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,
+ "zoom_label")));
+ gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,
+ "zoom_slider")));
+ } else {
+ g_signal_connect(gtk_builder_get_object(cam->xml, "zoom_slider"),
+ "value-changed", G_CALLBACK(zoom_change), cam);
+ gtk_range_set_value((GtkRange *)GTK_WIDGET(gtk_builder_get_object(cam->xml, "zoom_slider")),
+ (int)(cam->zoom / 256));
+ }
if (cam->hue < 0) {
gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(cam->xml,
"hue_icon")));

Privacy Policy