-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Added use_dpi setting to WindowDescriptor #1131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good - there are a few changes which could be useful, but nothing obviously blocking.
Can I be removed from this thread |
Wow, I wasn't expecting such quick action on my request. This is awesome. Thanks guys. |
You need to click unsubscribe. |
On my machine the new UI from your example is somewhat broken in higher scaling modes, which doesn't make sense. Also I feel like we should call some stuff |
Can you post some details and a screenshot? |
That is definitely better, although there's still some jank - if you go through this video frame by frame for example you can see a few examples. Examples.2020.12.22.-.19.25.50.01.mp4That being said, it's not super important, because we don't really expect people to be changing window scaling on/off that often ™️ |
Yeah, I'm fine with it stuttering when its being cycled at such a frequency. Given that it requires a full UI redraw on every switch, its not very surprising. |
A couple of thoughts. Would |
I don't exactly understand what you're offering here. Do you mean you want to change
They aren't tightly coupled. Both are triggered by seperate events, and are handled by diffrent pieces of code. |
I think they mean that when scale_factor is ignored, the scale_factor method should return i.e. the current scale_factor method should be pub fn scale_factor(&self)->f32{
if self.use_dpi { 1 } else{ self.scale_factor }
} and there should be a pub fn requested_scale_factor(&self)->f32 {self.scale_factor} |
This is the current behaviour, thats why I am confused. |
Yeah, I guess it might be nice to specify a custom scale factor in addition to disabling the system value. And the scale_factor variable would always hold the current value, with another holding the system scale factor if required. While subjective, to me having
I was thinking that changes to the scaling factor will effect the resolution reported and from the users perspective it might be better to receive both of these at the same time. |
Being able to supply your own "scale_factor" could be useful for testing. |
I made a major rework to implement @blunted2night s suggestions and clean everything up. |
rebased on master |
I made a few tweaks. Feel free to contest any of them:
|
Sounds good! |
Maybe closes #1118