[gnome-sudoku/arnaudb/wip/gtk4: 33/43] Make popovers work.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/arnaudb/wip/gtk4: 33/43] Make popovers work.
- Date: Wed, 5 Aug 2020 17:40:59 +0000 (UTC)
commit 67e083b671f65e86d35923c6a8cf3703347e4913
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Apr 17 22:05:30 2020 +0200
Make popovers work.
src/sudoku-view.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index f680dec..80e635f 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -96,6 +96,12 @@ private class SudokuCellView : DrawingArea
private EventControllerKey key_controller; // for keeping in memory
private GestureClick click_controller; // for keeping in memory
+ construct
+ {
+ BinLayout layout = new BinLayout ();
+ set_layout_manager (layout);
+ }
+
public SudokuCellView (int row, int col, ref SudokuGame game)
{
this.game = game;
@@ -190,6 +196,7 @@ private class SudokuCellView : DrawingArea
popover.add (number_picker);
popover.set_autohide (false);
popover.position = PositionType.BOTTOM;
+ popover.set_parent (this);
popover.notify["visible"].connect (()=> {
if (!popover.visible)
destroy_popover (ref popover, ref number_picker);
@@ -213,6 +220,7 @@ private class SudokuCellView : DrawingArea
earmark_popover.add (earmark_picker);
earmark_popover.set_autohide (false);
earmark_popover.position = PositionType.BOTTOM;
+ earmark_popover.set_parent (this);
earmark_popover.notify["visible"].connect (()=> {
if (!earmark_popover.visible)
destroy_popover (ref earmark_popover, ref earmark_picker);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]