aboutsummaryrefslogtreecommitdiffstats
path: root/src/camorama-window.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-04 17:37:01 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-05 14:33:35 -0300
commit0715aaefb72e27e5e1a811386236ce7da8e5e47e (patch)
tree1e657189a615d268480229a47632921b3c74eb68 /src/camorama-window.c
parenta64c94d43fe1044d76d003254eaa5e843cc2ee51 (diff)
add support for scaling the image with cairo
It is easy to scale the image with cairo. Add support for it. For now, it reserves about 2/3 of the screen for the image stream display, keeping 1/3 reserved for the interface. It probably makes sense to add ways for the user to change the scale. It should be noticed that the snapshots won't be affected for the scale; will keep using the image resolution. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/camorama-window.c')
-rw-r--r--src/camorama-window.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/camorama-window.c b/src/camorama-window.c
index c5c0857..ff1333c 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -194,7 +194,6 @@ static void tray_clicked_callback(GtkStatusIcon *status, guint button,
void load_interface(cam_t *cam)
{
unsigned int i;
- gchar *title;
GdkPixbuf *logo = NULL;
GtkCellRenderer *cell;
GtkWidget *small_res, *new_res;
@@ -258,11 +257,6 @@ void load_interface(cam_t *cam)
* glade_xml_signal_autoconnect(xml);
* this won't work, can't pass data to callbacks. have to do it individually :(*/
- title = g_strdup_printf("Camorama - %s - %dx%d", cam->name,
- cam->width, cam->height);
- gtk_window_set_title(GTK_WINDOW(window), title);
- g_free(title);
-
gtk_window_set_icon(GTK_WINDOW(window), logo);
gtk_window_set_icon(GTK_WINDOW(GTK_WIDGET(gtk_builder_get_object(cam->xml, "prefswindow"))), logo);
@@ -562,8 +556,7 @@ void load_interface(cam_t *cam)
gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(cam->xml, "string_entry")),
cam->usestring);
- gtk_widget_set_size_request(GTK_WIDGET(gtk_builder_get_object(cam->xml, "da")),
- cam->width, cam->height);
+ set_image_scale(cam);
prefswindow = GTK_WIDGET(gtk_builder_get_object(cam->xml, "prefswindow"));
}

Privacy Policy