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:
commit
149b57a737
1 changed files with 6 additions and 2 deletions
|
@ -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(>k_image));
|
button.set_image(Some(>k_image));
|
||||||
button.set_always_show_image(true);
|
button.set_always_show_image(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue