Skip to content

Commit

Permalink
Merge pull request #476 from slowsage/spotify-wayland-icon
Browse files Browse the repository at this point in the history
feat(launcher): item.name as fallback for app icon
  • Loading branch information
JakeStanger authored Feb 27, 2024
2 parents d29d4fd + f263849 commit 149b57a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/launcher/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@ impl ItemButton {

if appearance.show_icons {
let gtk_image = gtk::Image::new();
let image =
ImageProvider::parse(&item.app_id.clone(), icon_theme, true, appearance.icon_size);
let input = if item.app_id.is_empty() {
item.name.clone()
} else {
item.app_id.clone()
};
let image = ImageProvider::parse(&input, icon_theme, true, appearance.icon_size);
if let Some(image) = image {
button.set_image(Some(&gtk_image));
button.set_always_show_image(true);
Expand Down

0 comments on commit 149b57a

Please sign in to comment.