Improve scale-to-fit logic
Currently scale-to-fit scales down the view when it doesn't fit, but it doesn't make any attempt to scale it out back once it becomes possible again. This can lead to unnecessarily scaled windows when interacting with things like screen rotation, keyboard's exclusive zone, multiple screens or even just changing window's content; and the only way to reset back to normal scale is to close and open the window again.
It would be good to make sure the application is always given a chance to reset its scale to 1 whenever possible (a set of unit tests may be a great addition to that too).