From 53717709156570a3de5e111e40d0577f153b48b9 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Thu, 7 Apr 2022 20:38:04 +0200 Subject: [PATCH] enable prefs dialog search, fix sensitive flag of opacity and gradiant rows --- prefs.js | 17 +++++++++++++++++ ui/SettingsStyle.ui | 8 ++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/prefs.js b/prefs.js index 02d7997..cff63e4 100644 --- a/prefs.js +++ b/prefs.js @@ -166,6 +166,9 @@ const Preferences = class { this._builder.set_translation_domain(Me.metadata['gettext-domain']); if (window) { + this._window = window; + window.set_search_enabled(true); + // dialogs this._builder.add_from_file(Me.path + '/ui/AnimateAppIconHoverOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); @@ -1026,6 +1029,13 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); + if (this._window) { + this._settings.bind('trans-use-custom-opacity', + this._builder.get_object('trans_opacity_box2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); + } + this._builder.get_object('trans_opacity_override_switch').connect('notify::active', (widget) => { if (!widget.get_active()) this._builder.get_object('trans_dyn_switch').set_active(false); @@ -1061,6 +1071,13 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); + if (this._window) { + this._settings.bind('trans-use-custom-gradient', + this._builder.get_object('trans_gradient_box2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); + } + rgba.parse(this._settings.get_string('trans-gradient-top-color')); this._builder.get_object('trans_gradient_color1_colorbutton').set_rgba(rgba); diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index a97a936..b2ae021 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -251,7 +251,7 @@ - + Panel background opacity (%) @@ -264,7 +264,7 @@ - + Dynamic background opacity Change opacity when a window gets close to the panel @@ -309,7 +309,7 @@ - + Gradient top color and opacity (%) @@ -328,7 +328,7 @@ - + Gradient bottom color and opacity (%)