Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tray icons with incorrect size on fractionally scaled output #1175

Closed
minhduc0711 opened this issue Jul 24, 2021 · 9 comments · Fixed by #1190
Closed

Tray icons with incorrect size on fractionally scaled output #1175

minhduc0711 opened this issue Jul 24, 2021 · 9 comments · Fixed by #1190
Labels
bug Something isn't working

Comments

@minhduc0711
Copy link

The tray icons on the scaled monitor are weirdly sized on my scaled output
image
On my other unscaled output, they appear normally
image
Could it be related to #1174?

Version: Waybar v0.9.7-107-g1b4ddbc (branch 'master')

@luispabon
Copy link

Having the same problem:

image

the wifi signal icon (nm-applet) is 1/2 the size on a scale 2 display. This is from a recent update.

@Mathew-D
Copy link

If you go back to before commit 811f089 that fixes the error and the icons are the correct size. Something in that commit breaks the size on some icons.

@Mathew-D
Copy link

Also it gives this error if you use the master:
gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

@luispabon
Copy link

Reverting to 67d482d fixes it for me as well.

luispabon added a commit to luispabon/sway-ubuntu that referenced this issue Jul 30, 2021
@Alexays Alexays added the bug Something isn't working label Jul 31, 2021
@Alexays
Copy link
Owner

Alexays commented Jul 31, 2021

@mswiger can you take a look?

@minhduc0711
Copy link
Author

There's a small issue left: upon first launching the bar, the icons are way bigger than it should be. They would go back to their normal size if I do something that change the icons' states (e.g. change my ibus input method).
image

@mswiger
Copy link
Contributor

mswiger commented Aug 3, 2021

I am able to reproduce the issue that @minhduc0711 is seeing, but only with a multiple-display setup, and it does not reproduce 100% of the time (maybe like 25% of the time for me). It is relatively easy to reproduce by repeatedly reloading the Sway config file until the issue appears ($mod+Shift+c for me).

After spending a bunch of time debugging, this bug seems to behave like some kind of race condition. For tray items that take longer to populate in the tray, this issue never seems to happen. For tray items that populate quickly after waybar is loaded, this problem seems to happen pretty consistently.

From my debugging, when this issue manifests, it appears that the Image widget itself is allocating the wrong amount of space (it will allocate the scaled width/height when it should allocate the unscaled width/height). Not 100% sure how to proceed from here, but I will try to spend some more time on this later this week.

@mswiger
Copy link
Contributor

mswiger commented Aug 17, 2021

@minhduc0711 I believe that I have a fix for this now: #1211

@minhduc0711
Copy link
Author

Thank you for the quick fix, the issue is gone on my setup 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants