[gnome-sudoku/arnaudb/wip/gtk4: 36/47] Make things work.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/arnaudb/wip/gtk4: 36/47] Make things work.
- Date: Wed, 23 Sep 2020 16:36:39 +0000 (UTC)
commit fa3d69b594710f639de3ef2c0fa0c94edbd1d0b2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Apr 17 23:18:38 2020 +0200
Make things work.
src/sudoku-view.vala | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index 30f6d25..e49f817 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -127,6 +127,12 @@ private class SudokuCellView : Widget
game.cell_changed.connect (cell_changed_cb);
}
+ protected override void snapshot (Gtk.Snapshot snap)
+ {
+ drawing.queue_draw ();
+ base.snapshot (snap);
+ }
+
private inline void init_mouse () // called on construct
{
click_controller = new Gtk.GestureClick ();
@@ -513,6 +519,15 @@ public class SudokuView : Widget
}
}
+ protected override void snapshot (Gtk.Snapshot snap)
+ {
+ drawing.queue_draw ();
+ for (uint8 i = 0; i < game.board.cols; i++)
+ for (uint8 j = 0; j < game.board.rows; j++)
+ cells[i, j].queue_draw ();
+ base.snapshot (snap);
+ }
+
public SudokuView (SudokuGame game)
{
BinLayout layout = new BinLayout ();
@@ -604,7 +619,7 @@ public class SudokuView : Widget
this.update_highlights ();
// Redraw the board
- this.queue_draw ();
+ queue_draw ();
});
cells[row, col] = cell;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]