remove active status from all categories in all groups before we select our clicked category
This commit is contained in:
parent
1cc5a34b0a
commit
e058b79035
1 changed files with 4 additions and 3 deletions
7
main.py
7
main.py
|
|
@ -245,9 +245,10 @@ class MainWindow(Gtk.Window):
|
||||||
self.main_box.pack_start(scrolled_window, False, False, 0)
|
self.main_box.pack_start(scrolled_window, False, False, 0)
|
||||||
|
|
||||||
def on_category_clicked(self, category, group):
|
def on_category_clicked(self, category, group):
|
||||||
# Remove active state from all categories in the same group
|
# Remove active state from all widgets in all groups
|
||||||
for widget in self.category_widgets[group]:
|
for group_name in self.category_widgets:
|
||||||
widget.get_style_context().remove_class("dark-category-button-active")
|
for widget in self.category_widgets[group_name]:
|
||||||
|
widget.get_style_context().remove_class("dark-category-button-active")
|
||||||
|
|
||||||
# Add active state to the clicked category
|
# Add active state to the clicked category
|
||||||
display_title = self.category_groups[group][category]
|
display_title = self.category_groups[group][category]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue