1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 10:41:03 +02:00

Merge pull request #476 from slowsage/spotify-wayland-icon

feat(launcher): item.name as fallback for app icon
This commit is contained in:
Jake Stanger 2024-02-27 20:20:23 +00:00 committed by GitHub
commit 149b57a737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -166,8 +166,12 @@ impl ItemButton {
if appearance.show_icons { if appearance.show_icons {
let gtk_image = gtk::Image::new(); let gtk_image = gtk::Image::new();
let image = let input = if item.app_id.is_empty() {
ImageProvider::parse(&item.app_id.clone(), icon_theme, true, appearance.icon_size); item.name.clone()
} else {
item.app_id.clone()
};
let image = ImageProvider::parse(&input, icon_theme, true, appearance.icon_size);
if let Some(image) = image { if let Some(image) = image {
button.set_image(Some(&gtk_image)); button.set_image(Some(&gtk_image));
button.set_always_show_image(true); button.set_always_show_image(true);