feat(Group): enhance widget visibility management - set visibility instantly on module update using dynamic signal handling.

Improve performance - manage the visibility of updated module only instead of iterating over all modules on `hide_group`.
This commit is contained in:
Piotr Piwoński
2025-03-30 14:49:07 +00:00
parent 653732dfc6
commit 67df5f5838
5 changed files with 51 additions and 35 deletions
+5 -2
View File
@@ -17,7 +17,7 @@ class Group : public AModule {
operator Gtk::Widget &() override;
virtual Gtk::Box &getBox();
void addWidget(Gtk::Widget &widget);
void addWidget(AModule* module);
protected:
Gtk::Box box;
@@ -33,7 +33,10 @@ class Group : public AModule {
bool handleToggle(GdkEventButton *const &ev) override;
void show_group();
void hide_group();
void update_always_visible_modules();
void manage_visibility(AModule* module);
void show_widget(Gtk::Widget& widget);
void hide_widget(Gtk::Widget& widget);
void hide_current_widget_if_inactive();
};
} // namespace waybar