mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
extensions-app: Reset switch handle when it becomes insensitive
Currently the switches handle position reflects the requested extension state (as in: the user (de)activated the switch), while the actual extension state is reflected by the underlying state. That doesn't work well when the switch is insensitive though (for example on error), because the desaturation neuters the color that reflects the state. Address this by resetting the switch handle to the state when making it insensitive. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1263
This commit is contained in:
parent
0ab34fe21f
commit
d2583aa47b
2 changed files with 5 additions and 1 deletions
|
|
@ -54,7 +54,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch">
|
||||
<object class="GtkSwitch" id="switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">center</property>
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ var ExtensionRow = GObject.registerClass({
|
|||
'versionLabel',
|
||||
'authorLabel',
|
||||
'updatesIcon',
|
||||
'switch',
|
||||
'revealButton',
|
||||
'revealer',
|
||||
],
|
||||
|
|
@ -451,6 +452,9 @@ var ExtensionRow = GObject.registerClass({
|
|||
action.set_state(new GLib.Variant('b', state));
|
||||
action.enabled = this._canToggle();
|
||||
|
||||
if (!action.enabled)
|
||||
this._switch.active = state;
|
||||
|
||||
this._updatesIcon.visible = this.hasUpdate;
|
||||
|
||||
this._versionLabel.label = this.version.toString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue