[shotwell/wip/gtk4] Fix single page image rendering



commit a74209cf497cbdeb100da09959191c10d56d7bc7
Author: Jens Georg <mail jensge org>
Date:   Sun Apr 10 00:18:31 2022 +0200

    Fix single page image rendering
    
    more or less.

 src/SinglePhotoPage.vala | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/SinglePhotoPage.vala b/src/SinglePhotoPage.vala
index 8e716b13..05872f23 100644
--- a/src/SinglePhotoPage.vala
+++ b/src/SinglePhotoPage.vala
@@ -51,14 +51,12 @@ public abstract class SinglePhotoPage : Page {
 
         scrolled.set_child(viewport);
 
-        canvas.add_events(Gdk.EventMask.EXPOSURE_MASK | Gdk.EventMask.STRUCTURE_MASK 
-            | Gdk.EventMask.SUBSTRUCTURE_MASK);
-
-        viewport.size_allocate.connect(on_viewport_resize);
-        canvas.draw.connect(on_canvas_exposed);
+        viewport.notify["default-width"].connect(on_viewport_resize);
+        viewport.notify["default-height"].connect(on_viewport_resize);
+        viewport.notify["maximized"].connect(on_viewport_resize);
 
+        canvas.set_draw_func(on_canvas_exposed);
         set_event_source(canvas);
-        #endif
         Config.Facade.get_instance().colors_changed.connect(on_colors_changed);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]