Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
796 stars 100 forks source link

Clean-up of resizing logic #1337

Closed felipeerias closed 4 months ago

felipeerias commented 5 months ago

Clean-up of our resizing logic to make it more consistent and to remove some edge cases. This logic is now mostly encapsulated inside of WindowWidget.

Manual mode allows the window to be resized freely within the allowed boundaries. The maximum width depends on the number of active windows. The maximum height has been increased slightly to accommodate vertical videos better.

WindowWidget.getSizeForScale() is used to resize the window when using one of the preset sizes and when entering fullscreen. It will keep the window size within the boundaries while trying to preserve the current aspect ratio.

felipeerias commented 4 months ago

@svillar Thank you, I have applied your suggestions and rebased the branch. It is ready for review again.