mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 10:41:03 +02:00
fix(launcher): not resolving icon for some apps
When using spotify in wayland with hyprland, the spotify icon is not pulled up correctly by the launcher module. The class/app_id is "" while the name/title is "Spotify Premium". This uses item.name as a fallback which ensure spotify icon shows up correctly under wayland. Refs: #228, #146
This commit is contained in:
parent
39cb35b59d
commit
f2638497fa
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