Skip to content

Fix scale computation when fitting framebuffer to local view

Luca Carlon requested to merge lcarlon/krdc:fit-fix into master

When the "fit to window size" option is selected, nothing happens for me. I can only make this work by adding the scaling factor tool to the toolbar (which I only knew is there because I read the code) and set the factor to 1 and then to 0. This seems pretty difficult to do for a user and not completely reasonable, as "fit", should immediately "fit".

Also, with the previous implementation, depending on whether the framebuffer was bigger or smaller than the view, the scaling factor slider was inverting the orientation.

This patch ensures it immediately fits, while still allowing a custom additional scaling.

Merge request reports