[gnome-taquin/arnaudb/wip/gtk4: 15/56] Adapt to DrawingArea API.




commit 783e75c06a45e6446fffc6a6cc650b3fae2b18d6
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Feb 19 22:09:48 2020 +0100

    Adapt to DrawingArea API.

 src/taquin-view.vala | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/taquin-view.vala b/src/taquin-view.vala
index 1b367af..5380fff 100644
--- a/src/taquin-view.vala
+++ b/src/taquin-view.vala
@@ -68,6 +68,7 @@ private class TaquinView : Gtk.DrawingArea
         can_focus = true;
         init_mouse ();
         init_keyboard ();
+        set_draw_func (draw);
         size_allocate.connect (on_size_allocate);
     }
 
@@ -131,7 +132,7 @@ private class TaquinView : Gtk.DrawingArea
         arrows = size / 100;
     }
 
-    protected override bool draw (Cairo.Context cr)
+    private void draw (Gtk.DrawingArea _this, Cairo.Context cr, int width, int height)
     {
         if (tiles_pattern == null || render_size != tile_size)
         {
@@ -263,8 +264,6 @@ private class TaquinView : Gtk.DrawingArea
             if (animation_offset > tile_size)
                 animate = false;
         }
-
-        return false;
     }
 
     private static inline void _refresh_pixmaps (Cairo.Context context, Pixbuf? unscaled_pixbuf, ref int 
board_size)


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