Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zooming & fix frame sizing #206

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

westito
Copy link

@westito westito commented Nov 1, 2022

  • device_frame: I fixed the size handling of device frames. The specified frameSize and the painted dimensions were twice as big as should be. This is necessary to eliminate scaling. The behaviour can be changed by DeviceFrame(fitContainer) parameter. The default value is true, so nothing changes to current users. If fitContainer set to false, the screenSize is used to calculate whole device frame (scales by ratio of screenSize and screenPath).
  • device_preview: I added a zoom control to the tool panel. Defaults to fit the screen, so nothing changes to current users. When zoom enabled, the device frame is wrapped into a InteractiveViewer with scaling disabled (scaling handled by zoom control). The device can be moved outside the frame and panning is ignored inside that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant