[gnome-taquin/arnaudb/wip/gtk4: 75/108] Adapt to MenuButton API.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin/arnaudb/wip/gtk4: 75/108] Adapt to MenuButton API.
- Date: Tue, 29 Sep 2020 14:16:03 +0000 (UTC)
commit 5a26f90819e385014e435b7302efe70591e2fd84
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Feb 19 21:52:13 2020 +0100
Adapt to MenuButton API.
src/base-headerbar.vala | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/base-headerbar.vala b/src/base-headerbar.vala
index a536635..4d6bc5a 100644
--- a/src/base-headerbar.vala
+++ b/src/base-headerbar.vala
@@ -132,16 +132,17 @@ private class BaseHeaderBar : NightTimeAwareHeaderBar, AdaptativeWidget
protected inline void hide_hamburger_menu ()
{
- if (info_button.active)
- info_button.active = false;
+ info_button.popdown ();
}
internal void toggle_hamburger_menu ()
{
- if (info_button.visible)
- info_button.active = !info_button.active;
- else
+ if (!info_button.visible)
toggle_view_menu ();
+ else if (info_button.popover.visible) // TODO hackish 1/2
+ info_button.popdown ();
+ else
+ info_button.popup ();
}
protected virtual void toggle_view_menu () {}
@@ -304,6 +305,6 @@ private class BaseHeaderBar : NightTimeAwareHeaderBar, AdaptativeWidget
internal virtual bool has_popover ()
{
- return info_button.active;
+ return info_button.popover.visible; // TODO hackish 2/2
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]