Skip to content

Commit bc9116f

Browse files
committed
fix: remove category icon if alt-tab is active
1 parent 93eb482 commit bc9116f

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/app.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -634,23 +634,24 @@ impl cosmic::Application for CosmicLauncher {
634634
}));
635635

636636
let mut button_content = Vec::new();
637-
if let Some(source) = item.category_icon.as_ref() {
638-
let name = match source {
639-
IconSource::Name(name) | IconSource::Mime(name) => name,
640-
};
641-
button_content.push(
642-
icon(from_name(name.clone()).into())
643-
.width(Length::Fixed(16.0))
644-
.height(Length::Fixed(16.0))
645-
.style(cosmic::theme::Svg::Custom(Rc::new(|theme| {
646-
cosmic::iced_style::svg::Appearance {
647-
color: Some(theme.cosmic().on_bg_color().into()),
648-
}
649-
})))
650-
.into(),
651-
);
637+
if !self.alt_tab {
638+
if let Some(source) = item.category_icon.as_ref() {
639+
let name = match source {
640+
IconSource::Name(name) | IconSource::Mime(name) => name,
641+
};
642+
button_content.push(
643+
icon(from_name(name.clone()).into())
644+
.width(Length::Fixed(16.0))
645+
.height(Length::Fixed(16.0))
646+
.style(cosmic::theme::Svg::Custom(Rc::new(|theme| {
647+
cosmic::iced_style::svg::Appearance {
648+
color: Some(theme.cosmic().on_bg_color().into()),
649+
}
650+
})))
651+
.into(),
652+
);
653+
}
652654
}
653-
654655
if let Some(source) = item.icon.as_ref() {
655656
let name = match source {
656657
IconSource::Name(name) | IconSource::Mime(name) => name,

0 commit comments

Comments
 (0)