Closed Zocker1999NET closed 3 years ago
You're right, scaling should be respected by default. I'm not even sure if adding a syntax for specifying the size in physical screen pixels is even worth it, I would guess the use case for that would be very limited.
Alright, as of commit https://github.com/mortie/swaylock-effects/commit/84389734474572f1e99c88c42424d19b0b80742b, the non-percent numbers in --effect-compose should respect scaling.
Quoted the manual of
--effect-compose
:I want to use effect-compose to add a company logo above the indicator in a similar size. As I tried to resize it to the right size I discovered that the indicator's size is affected by scaling of the output but the size of effect-compose is not. For explaining, I have two screens (the internal of my laptop and an external screen) and the laptop screen has enabled an scaling of 2 while the normal screen has a scaling of 1. Also both screens have different resolutions (3000x2000 vs 2560x1440). Because of the different resolutions, I cannot use the
%
modifier and because of the different scaling, I cannot use an absolute declaration.I would propose adding a new modifier (maybe a
~
or something else) which allows setting the size in pixels but is affected by the scaling of the screen (e.g.300~x-1
), if this is possible to implement. Also a~%
modifier must not be implemented because it makes no sense that a fraction of the screen size may be affected by the scaling. This would allow users using different scalings on different screens to let symbols having the same size relative to the indicator across different screens for example, while keeping the old behavior that the pixel size is not affected by the scaling.