enable prefs dialog search, fix sensitive flag of opacity and gradiant rows

This commit is contained in:
Philipp Unger
2022-04-07 20:38:04 +02:00
parent 7c1c1b306b
commit 5371770915
2 changed files with 21 additions and 4 deletions

View File

@@ -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);