From d5f868bb25f89cdab164553702f9296ea28087d3 Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Wed, 1 Mar 2023 12:10:57 -0800 Subject: [PATCH] quickSettings: Bind the outer button's toggle-mode to the inner buttons When the `QuickMenuToggle` was a discrete button, it could be set to toggle mode, but the inner buttons no longer reacts as expected. Bind the `toggle-mode` property between the `QuickMenuToggle` and its contents so they behave as single toggle when enabled. Part-of: --- js/ui/quickSettings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/quickSettings.js b/js/ui/quickSettings.js index d0dc2e996..8ba5ac4f4 100644 --- a/js/ui/quickSettings.js +++ b/js/ui/quickSettings.js @@ -186,9 +186,13 @@ var QuickMenuToggle = GObject.registerClass({ }); this._box.add_child(this._menuButton); + this.bind_property('toggle-mode', + contents, 'toggle-mode', + GObject.BindingFlags.SYNC_CREATE); this.bind_property('checked', contents, 'checked', - GObject.BindingFlags.SYNC_CREATE); + GObject.BindingFlags.SYNC_CREATE | + GObject.BindingFlags.BIDIRECTIONAL); this.bind_property('title', contents, 'title', GObject.BindingFlags.SYNC_CREATE);