[gnome-sudoku/arnaudb/wip/gtk4: 40/47] Fix SudokuView focus controller.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/arnaudb/wip/gtk4: 40/47] Fix SudokuView focus controller.
- Date: Wed, 23 Sep 2020 16:36:39 +0000 (UTC)
commit 48e984b92e6db8c4c027bddda2175b7fdbfe05bc
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Aug 5 19:20:25 2020 +0200
Fix SudokuView focus controller.
src/sudoku-view.vala | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index c8761af..2d9f06c 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -366,7 +366,7 @@ private class SudokuCellView : Widget
private inline void draw (DrawingArea _this, Cairo.Context c, int new_width, int new_height)
{
RGBA background_color;
- if (_selected && is_focus)
+ if (_selected && focus_controller.is_focus)
background_color = selected_bg_color;
else if (is_fixed)
background_color = fixed_cell_color;
@@ -604,13 +604,11 @@ public class SudokuView : Widget
this.set_selected (cell_row, cell_col);
this.update_highlights ();
queue_draw ();
-
- return false;
});
- cell.focus_out_event.connect (() => {
+ cell.focus_controller.leave.connect (() => {
if (game.paused)
- return false;
+ return;
this.set_selected (-1, -1);
this.update_highlights ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]