mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 09:15:22 +01:00
[GH-ISSUE #99] Tray icons are invisible and un-clickable #1466
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#1466
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yavko on GitHub (Apr 4, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/99
Describe the bug
Tray icons are just invisible and un-clickable
To Reproduce
Steps to reproduce the behavior:
Expected behavior
i can click on icons, and see them
System information:
0.11.0atm)Configuration
Config
Styles
Additional context
works in trayer
Screenshots
@JakeStanger commented on GitHub (Apr 7, 2023):
Is this consistently happening, or just a one-off? I know #65 was looking at a potentially related issue where some items don't show, but I've not witnessed it consistently not show anything.
Are you able to try removing
icon_themefrom your config, and see if the problem still occurs?@yavko commented on GitHub (Apr 7, 2023):
This happened before I added
icon_theme. Its always happening, I can tell when I open more tray applications, more empty buttons are added, but not only are they empty, but they also cannot be interacted with.@JakeStanger commented on GitHub (Apr 10, 2023):
What apps are you using that are creating (broken) tray items? Just one or two programs I can easily test will be great.
Also, if you use the GTK inspector, does it look like the structure is in tact? It should look something like this:

@yavko commented on GitHub (Apr 11, 2023):
nm-tray was one

@JakeStanger commented on GitHub (Apr 16, 2023):
So it's generating the whole tree correctly, which is odd (I assume there's a
GtkImageelement offscreen). Are icons working elsewhere? Like if you add one of thelauncherorfocusedmodules, or a custom with just an image with the src of egicon:firefox, does that show? I'm wondering if this is a NixOS issue where it's failing to resolve the GTK theme.@Gajus84 commented on GitHub (Apr 16, 2023):
I'm on Arch and the problem is also existent.
The Icon that works is from KDE Connect.
Icons in
focuseddo work.@JakeStanger commented on GitHub (Apr 16, 2023):
Well there goes that theory then :/
Thanks for the additional info. What compositor are you using? And what icon theme? I'm still not convinced that's not the problem.
I take it neither of you are seeing any errors in the log?
@Gajus84 commented on GitHub (Apr 16, 2023):
I'm also on Hyprland. Icon Theme is Adwaita, but I also tried Breeze without any change.
Unfortunately no errors in the log, yes.
Isn't KDE Connect a QT-App? I'm not a pro, but could the icon there come from qt5ct and not directly from the source? IDK if thats a hint or even a thing :D
Edit: In Waybar all icons are shown. The moment I start Ironbar as well, all icons except of the KDE-Connect one disappear. Terminal running Waybar then prompts
[error] Invalid Status Notifier Item: :1.44:1.44, /StatusNotifierItem@JakeStanger commented on GitHub (Apr 16, 2023):
That seems as good a theory as any. I have Dropbox running on my machine, which is QT though, and that does have a working tray icon, so I'm not sure. I've tried KDE Connect on my machine, and I can't get the icon tray to show in either Ironbar or Waybar which is handy.
I think the
StatusNotifierItemspec in general seems to be quite finicky and is full of improper implementations. I know Stray, the lib Ironbar uses, has a few problems we've been trying to sort out, and I wouldn't be surprised if apps are incorrectly implementing their end too.I have just pushed up a commit to master that adds some more debug logging to the icon tray module to try and capture what's going on. If one of you gets a chance, can you try a minimal repro (just the tray module) with
IRONBAR_LOG=traceand send me the output to wade through please?@yavko commented on GitHub (Apr 16, 2023):
Oh yeah I also run kde connect, I have 2 hidden icons, so yeah seems kde connect icon just doesn't show
@Gajus84 commented on GitHub (Apr 16, 2023):
Here you go.
log.txt
@JakeStanger commented on GitHub (Apr 16, 2023):
Thanks! It looks you might be right @Gajus84, the icon names are just missing from some tray items, so no image is getting set and the menu item is empty (so has no size, explaining why it's unclickable).
They do provide a pixbuf though, so in theory it should now fall back to that. And if that doesn't exist, it should fall back to displaying the item name. And if that doesn't exist, it'll display the internal address (which is useless, but at least the button will show...).
I don't seem to have anything on my machine that provides the pixbuf data (all my tray items use the icon name), so I've not been able to test the code for the pixbuf actually works. If you get time, are you able to try building #109 and see if that resolves it please?
@yavko commented on GitHub (Apr 16, 2023):
As I made a comment on the PR, it doesn't work for me

@Gajus84 commented on GitHub (Apr 17, 2023):
Same for me. Here is a new log after applying #109
log.txt
I noticed
icon_theme_path: Noneon those which are not visible. KDEconnect is different there with a "some" string?@JakeStanger commented on GitHub (Apr 20, 2023):
Oh that's an interesting spot, I wonder if that's what's happening. Cheers for the log too.
I'll probably have a crawl through Waybar's code too since it must be doing the same thing but with more success.
@JakeStanger commented on GitHub (Apr 21, 2023):
Right, so it seems the actual problem was that my code for reading the pixmap was just broken 🙃 I was able to pull out the pixmap data for one of the broken icons from the log (thanks again) and load that in, and I've managed to copy this project to get the image loading working.
The PR is updated so if you get a chance pls let me know if it works now!
@yavko commented on GitHub (Apr 22, 2023):
It mostly fixed it, but it looks demonic, I have no clue why. Also low quality icons as I reported in #96

EDIT: nextcloud icon icon was red for other reasons, but fcitx5 input one (one that says
en) still does@Gajus84 commented on GitHub (Apr 22, 2023):
I can confirm it fixes something. But introduced a new strange behavior as well:
Ironbar after first login:
Note: Last Icon is Udiskie, that should be inactive
Ironbar after killing it and restarting it via Terminal:
Waybar as a comparison looks always like this:

Note: Tutanota is not shown, but still Udiskie
@JakeStanger commented on GitHub (Apr 22, 2023):
This is probably related to the scaling, and probably overlaps with #96. Currently the icons are rendered at 16x16 regardless of their original size. I also just picked bilinear scaling without much thought so that might not actually be the best option.
I think unfortunately this isn't new, but more likely the first time you've encountered the issues discussed in #84 and #65. There's possibly some kinks in the ironbar logic that need ironing out (ha) but it seems like a lot of the problems are coming from the
straylibrary at the moment.The ordering is supposed to be more consistent though, so not sure why things are switching around quite so much.
@JakeStanger commented on GitHub (Apr 22, 2023):
Since the original issue is resolved, I'll merge the PR and close this. If you have any tray issues you think are not covered by the linked issue/PR, feel free to stick a comment in the issue.