On Web, don't scale the canvas on scale factor changes #2864
Labels
C - needs discussion
Direction must be ironed out
DS - web
S - enhancement
Wouldn't this be the coolest?
The documentation says about
WindowEvent::ScaleFactorChanged::new_inner_size
:This isn't really possible on Web, because the Web doesn't suggest anything. After some IRC discussion we established that to be consistent with other backends, we should do whats usually "expected" here and scale the canvas with the scale factor, which is how it works currently anyway.
But this is often not desirable, because users usually want to control the size of the canvas through CSS and don't want Winit to overwrite it, which will be made possible by #2859. But changing the scale factor, will currently by default overwrite the any user defined CSS values, unless the user changes
WindowEvent::ScaleFactorChanged::new_inner_size
back to it's old value, which was taken into account by #2860.I'm suggesting we should lean into the "suggested by the OS" argument, which in this case would be whatever CSS says is the new value, not overwriting any values set through CSS by default.
The text was updated successfully, but these errors were encountered: