Event::WindowScale wasn't fully connected, but the druid-shell part of it is somewhat functional, although not complete. Still, it's better to move this forward and surface the event to widgets.
The Ctx::scale method is added to every context and makes accessing the current window's scale as easy as accessing the widget's size. This is really a convenience method to improve ergonomics and doesn't enable new functionality.
Additionally I cleaned up the new SVG widget (from #2106) and it now makes use of this scale information to properly render the SVG at various scale factors.
Event::WindowScale
wasn't fully connected, but thedruid-shell
part of it is somewhat functional, although not complete. Still, it's better to move this forward and surface the event to widgets.The
Ctx::scale
method is added to every context and makes accessing the current window's scale as easy as accessing the widget's size. This is really a convenience method to improve ergonomics and doesn't enable new functionality.Additionally I cleaned up the new SVG widget (from #2106) and it now makes use of this scale information to properly render the SVG at various scale factors.
Fixes #2333