[gnome-klotski/arnaudb/wip/gtk4: 8/25] Adapt to DrawingArea API.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-klotski/arnaudb/wip/gtk4: 8/25] Adapt to DrawingArea API.
- Date: Tue, 29 Sep 2020 13:44:31 +0000 (UTC)
commit cedefd5a6fa2b69ae1449dd804b832c499cc4f08
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Mar 5 19:00:59 2020 +0100
Adapt to DrawingArea API.
src/puzzle-view.vala | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/puzzle-view.vala b/src/puzzle-view.vala
index a0d075e..814c226 100644
--- a/src/puzzle-view.vala
+++ b/src/puzzle-view.vala
@@ -74,6 +74,7 @@ private class PuzzleView : Gtk.DrawingArea
construct
{
init_mouse ();
+ set_draw_func (draw);
style_context = get_style_context ();
@@ -117,7 +118,7 @@ private class PuzzleView : Gtk.DrawingArea
tiles_handle_init_done = true;
}
- protected override bool draw (Cairo.Context cr)
+ private void draw (Gtk.DrawingArea _this, Cairo.Context cr, int new_width, int new_height)
{
if (tile_size != render_size)
{
@@ -175,8 +176,6 @@ private class PuzzleView : Gtk.DrawingArea
cr.fill ();
}
}
-
- return false;
}
private void draw_square (Cairo.Context cr, uint8 x, uint8 y, double kx, double ky)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]