added transparancey scale; added interactive debug button

This commit is contained in:
2023-10-21 18:58:20 -05:00
parent f27f738351
commit dbc198513f
7 changed files with 192 additions and 19 deletions

View File

@@ -16,8 +16,11 @@ class BaseContainer(Gtk.Box):
def __init__(self):
super(BaseContainer, self).__init__()
self.ctx = self.get_style_context()
self._setup_styling()
self._setup_signals()
self._subscribe_to_events()
self._load_widgets()
self.show_all()
@@ -25,13 +28,22 @@ class BaseContainer(Gtk.Box):
def _setup_styling(self):
self.set_orientation(Gtk.Orientation.VERTICAL)
ctx = self.get_style_context()
ctx.add_class("base-container")
self.ctx.add_class("base-container")
def _setup_signals(self):
...
def _subscribe_to_events(self):
event_system.subscribe("update_transparency", self._update_transparency)
event_system.subscribe("remove_transparency", self._remove_transparency)
def _load_widgets(self):
self.add(LeftContainer())
self.add(CenterContainer())
self.add(RightContainer())
def _update_transparency(self):
self.ctx.add_class(f"mw_transparency_{settings.theming.transparency}")
def _remove_transparency(self):
self.ctx.remove_class(f"mw_transparency_{settings.theming.transparency}")