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

Positioning of a layout on a different sized screen with rotation... #490

Closed
zpaolo11x opened this issue Oct 4, 2018 · 3 comments
Closed

Comments

@zpaolo11x
Copy link

zpaolo11x commented Oct 4, 2018

I think there's a bug, at least on OSX, in the way AM adapts a layout with a different aspect ratio with respect to the screen. Say you have a 16:10 screen with a 2:4 layout displayed over it in "preserve aspect ratio" mode. If you toggle rotation, the layout is partially cut off the screen and not centered.

Sample code:

fe.layout.base_rotation = 1
fe.layout.width = 200
fe.layout.height = 400
fe.layout.preserve_aspect_ratio = true
local pippo = fe.add_text("",0,0,fe.layout.width,fe.layout.height)
local pappo = fe.add_text("A",1,1,fe.layout.width-2,fe.layout.height-2)
pippo.set_bg_rgb(250,100,0)
pappo.set_bg_rgb(50,100,0)

See the attached images for the theme with base rotation = 0 and base rotation = 1
screen226
screen227

@zpaolo11x
Copy link
Author

Confirmed the same issue on Windows, not only on Mac OS

@oomek
Copy link
Collaborator

oomek commented Nov 25, 2018

Fixed in #512
Thank you for spotting that.

@oomek
Copy link
Collaborator

oomek commented Dec 20, 2018

Fix merged #512

@oomek oomek closed this as completed Dec 20, 2018
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

No branches or pull requests

2 participants