-
Notifications
You must be signed in to change notification settings - Fork 343
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
Scale offset according to DPI #1039
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1039 +/- ##
=======================================
Coverage 61.18% 61.18%
=======================================
Files 45 45
Lines 7003 7003
=======================================
Hits 4285 4285
Misses 2718 2718
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks for the improvement. I agree that it's good to scale more things. Have you tested this on X11 or wayland? |
I tested it on X11. I'll test it on wayland as well if needed |
It does not have an effect on wayland. calc_window_pos is only used in X11. The current behavior in wayland is:
Is this already the desired behaviour? What's the behaviour on X11? Can you maybe explain a bit why? |
Yes, the behaviour on wayland is already what I wanted to achieve. On X11, an offset of N was always interpreted as "N pixels", regardless of the scale. It would have to be "scale x N pixels" to be consistent with wayland. As a concrete example, let's say I have a panel at the bottom of the screen that is 30 pixels high, and I want the notifications to appear just above it, without overlapping. I can set origin = bottom and offset = 0x30 and it works as intended. Now, if I configure everything to scale to 2X, the panel is 60 pixels high (correct), the notifications are twice as big (correct), but the offset is still 30 pixels (incorrect, because now the notifications cover the top half of the panel). With this change, the offset will also be scaled to 60 pixels. I hope the explanation is clear. If you need it, I can improve it or provide screenshots. |
Thanks for the explanation @livanh. I get the need for this and it seems like a logical change (espcially so, since it's already like this on wayland). I'll go ahead an merge it! |
dunst-project/dunst#1039 Offset was patched to take into account scale, which messed up my positioning. Divide with scale (2) to get the correct offset.
Currently the notification size changes according to the "scale" option, but the offset does not. I believe it makes more sense to scale them together