From ed39a9b434f90a62d80b984eb98e89ac833b5b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 9 Nov 2021 06:55:00 +0100 Subject: Add elementary scrolling support to the view --- fastiv-view.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'fastiv-view.c') diff --git a/fastiv-view.c b/fastiv-view.c index 037008d..da4aa12 100644 --- a/fastiv-view.c +++ b/fastiv-view.c @@ -60,21 +60,15 @@ static void fastiv_view_get_preferred_height( GtkWidget *widget, gint *minimum, gint *natural) { - *minimum = 0; - *natural = 0; - FastivView *self = FASTIV_VIEW(widget); - *natural = get_display_height(self); + *minimum = *natural = get_display_height(self); } static void fastiv_view_get_preferred_width(GtkWidget *widget, gint *minimum, gint *natural) { - *minimum = 0; - *natural = 0; - FastivView *self = FASTIV_VIEW(widget); - *natural = get_display_width(self); + *minimum = *natural = get_display_width(self); } static void @@ -207,6 +201,7 @@ fastiv_view_open(FastivView *self, const gchar *path, GError **error) cairo_surface_destroy(self->surface); self->surface = surface; + self->scale = 1.0; gtk_widget_queue_resize(GTK_WIDGET(self)); return TRUE; } -- cgit v1.2.3