Skip to content

Commit

Permalink
cs_themes: Fix the stack switcher sensitivity (#12117)
Browse files Browse the repository at this point in the history
When hiding the stack switcher we need to set both the opacity and
sensitivity. Otherwise the buttons can still be clicked even when they are
hidden.

Fixes: #12115
  • Loading branch information
JosephMcc committed Apr 3, 2024
1 parent d7ca6a6 commit f1dc502
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,14 @@ def set_mode(self, mode, startup=False):
else:
transition = Gtk.StackTransitionType.CROSSFADE

switcher_widget = Gio.Application.get_default().stack_switcher

if mode == "simplified":
Gio.Application.get_default().stack_switcher.set_opacity(0.0)
switcher_widget.set_opacity(0.0)
switcher_widget.set_sensitive(False)
else:
Gio.Application.get_default().stack_switcher.set_opacity(1.0)
switcher_widget.set_opacity(1.0)
switcher_widget.set_sensitive(True)

self.sidePage.stack.set_visible_child_full(mode, transition)

Expand Down

0 comments on commit f1dc502

Please sign in to comment.