1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

fix(focused): empty icon rendered when show_icon = false

Fixes #184
This commit is contained in:
Jake Stanger 2023-06-17 16:43:38 +01:00
parent 6f7af07cdd
commit ac34c05d2e
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -97,7 +97,10 @@ impl Module<gtk::Box> for FocusedModule {
let container = gtk::Box::new(info.bar_position.get_orientation(), 5);
let icon = gtk::Image::new();
add_class(&icon, "icon");
if self.show_icon {
add_class(&icon, "icon");
container.add(&icon);
}
let label = Label::new(None);
add_class(&label, "label");
@ -106,7 +109,6 @@ impl Module<gtk::Box> for FocusedModule {
truncate.truncate_label(&label);
}
container.add(&icon);
container.add(&label);
{