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

[Feature Request ] Follow Scaling per monitor by default #261

Open
kRHYME7 opened this issue Apr 8, 2024 · 9 comments · May be fixed by #591
Open

[Feature Request ] Follow Scaling per monitor by default #261

kRHYME7 opened this issue Apr 8, 2024 · 9 comments · May be fixed by #591

Comments

@kRHYME7
Copy link

kRHYME7 commented Apr 8, 2024

Maybe I missed something. For QOL, is it possible for the lockscreen layer to follow per monitor scaling by default?
It's possible to script it and generate compatible per monitor configs, but would be nice to have this by default. Thank you!

Example

  • mon1 has scaling of 2 while mon2 has 1.
  • hidpi monitors together with non hidpi
  • Easy to reproduced for other users 😉

EDIT:
MB, I really missed this
#238

But please, maybe an option as a feature? 😄

@kRHYME7 kRHYME7 changed the title [Feat Req ] Follow Scaling per monitor by default [Feature Request ] Follow Scaling per monitor by default Apr 20, 2024
@chrollorifat
Copy link

I also endorse this feature request. It will be very helpful.

@jaredmontoya
Copy link

jaredmontoya commented Oct 30, 2024

I think without this feature hyprlock can't be called feature complete. I use multiple laptops with multiple mixed monitor configurations at different times. This use case requires the same config to work for every monitor you might encounter.

There should be some internal mechanism that scales position and font size numbers depending on the screen scale.

@PaideiaDilemma
Copy link
Collaborator

I do think that this is a good idea and i am down to implement it.

There is a discussion to be had on how to design the options and semantics.
Do we just introduce the possibility to use % in position and size options?

size = 25%, 25%
position = 10%, 10%

seems ok, but when we center the widget it might be a bit odd.
Any other ideas?

@jaredmontoya
Copy link

jaredmontoya commented Oct 30, 2024

If the screen is 1920x1080 and size = 25%, 25% then it should just be auto scaled to size = 480, 270 under the hood. Can you explain why would it look weird?

I get that 24% is 1920*24/100 = 460,8 but we can't do anything except round that up to 461 right?

@PaideiaDilemma
Copy link
Collaborator

i meant that when we are centered, it is unclear that 10% would actually be 60%-half width of widget. but that is already how it works so it would not be a problem i guess.

@BBaoVanC
Copy link

i meant that when we are centered, it is unclear that 10% would actually be 60%-half width of widget. but that is already how it works so it would not be a problem i guess.

What, for size percentages you wouldn't multiply by scale because it's already the ratio.

But I personally think there should be a pt font size (what every single other program does) which is scaled automatically, because percentages of the monitor don't make any sense for text size. It should just simply be scaled up based on the configured scale of the monitor.

@PaideiaDilemma
Copy link
Collaborator

i was talking about position.
But yeah i think for the font size (label only) we need to introduce a pt format to handle that like you described.

@jaredmontoya
Copy link

jaredmontoya commented Nov 26, 2024

@PaideiaDilemma do you have any ideas on how to implement the part 2 of this FR?

I think font/image size should just be multiplied by the scale number of the monitor it is displayed on. Or there are edge cases that I didn't think of?

if ("someone actually wants to use the old font size that is not scaled") {
 "a px suffix can be added to access it"
} else if ("backwards compatibility is required") {
 "I guess % suffix for the scaled font size can be added and old font size without a suffix kept as is"
 // but I don't see the reason to do that
 // because making the font size number scale with monitor scale by default won't break
 // layouts in a hard to fix way. And the reward for fixing it
 // is that it will now work on all screens the same way
 // which is what most people want
}

@PaideiaDilemma
Copy link
Collaborator

Calculating absolute size based on the monitor scale is not enough. It needs to be based on the monitor resolution.
I am thinking about the not suffix -> current behaviour.
pt suffix -> adjust according to resolution. pt is specified in terms of actual size on the monitor.

For image, i think we should rename the old size option, since it does not make any sense. I think the right thing would to to be able to set the x dimension via x or % and let y be x*ratio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants