mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
enable prefs dialog search, fix sensitive flag of opacity and gradiant rows
This commit is contained in:
17
prefs.js
17
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);
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<object class="AdwActionRow" id="trans_opacity_box">
|
||||
<property name="title" translatable="yes">Panel background opacity (%)</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="trans_opacity_spinbutton">
|
||||
@@ -264,7 +264,7 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow" id="trans_opacity_box">
|
||||
<object class="AdwActionRow" id="trans_opacity_box2">
|
||||
<property name="title" translatable="yes">Dynamic background opacity</property>
|
||||
<property name="subtitle" translatable="yes">Change opacity when a window gets close to the panel</property>
|
||||
<child>
|
||||
@@ -309,7 +309,7 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow" id="trans_gradient_box"> <!-- TODO this id should be the entire box-->
|
||||
<object class="AdwActionRow" id="trans_gradient_box">
|
||||
<property name="title" translatable="yes">Gradient top color and opacity (%)</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="trans_gradient_color1_colorbutton">
|
||||
@@ -328,7 +328,7 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<object class="AdwActionRow" id="trans_gradient_box2">
|
||||
<property name="title" translatable="yes">Gradient bottom color and opacity (%)</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="trans_gradient_color2_colorbutton">
|
||||
|
||||
Reference in New Issue
Block a user