Problems with scaling - MacOS
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Problems with scaling - MacOS
HI
I wrote an app on my iMac with a screen resolution of 1024 x 768. Great - It all worked.
I sent it to a friend who had an Airbook 11 inch. That screen resolution is on 1366 x 768 so the Mac 'trimmed' the bottom of the Window (Because of the status bay and dock I think). Not so good.
To fix this
I tried full screen mode (all modes) and that sort of worked. It showed more of Window but not all of it. In my mind, it should fit.
In my mind should work but it does not.
So
I tried the scale factor down to 0.75 and it sort of worked. It fitted on the Airbook just great as it did scale the whole app down, but it still trimmed the Window (The same amount as if it did not fit), even though it actually fitted!!
Argh.
Both method trim the Window, even though there is enough space!!!
book
Is there a way I can scale the app down so I do not have to relayout it all out just to support the Airbook?
Any thoughts?
I wrote an app on my iMac with a screen resolution of 1024 x 768. Great - It all worked.
I sent it to a friend who had an Airbook 11 inch. That screen resolution is on 1366 x 768 so the Mac 'trimmed' the bottom of the Window (Because of the status bay and dock I think). Not so good.
To fix this
I tried full screen mode (all modes) and that sort of worked. It showed more of Window but not all of it. In my mind, it should fit.
In my mind should work but it does not.
So
I tried the scale factor down to 0.75 and it sort of worked. It fitted on the Airbook just great as it did scale the whole app down, but it still trimmed the Window (The same amount as if it did not fit), even though it actually fitted!!
Argh.
Both method trim the Window, even though there is enough space!!!
book
Is there a way I can scale the app down so I do not have to relayout it all out just to support the Airbook?
Any thoughts?
- Attachments
-
- FullScreenTest.zip
- Test Stack
- (1.96 KiB) Downloaded 309 times
Last edited by mvillion on Sun Aug 03, 2014 3:14 pm, edited 4 times in total.
Re: Problems with scaling - MacOS
Hi.
I develop for desktop, so I am probably out of my depth here. But what happens if you set the rect of the card window to the screenRect? Perhaps in a preOpenCard handler. Is that property supported on mobile as it is in the old-fashioned world?
Craig Newman
I develop for desktop, so I am probably out of my depth here. But what happens if you set the rect of the card window to the screenRect? Perhaps in a preOpenCard handler. Is that property supported on mobile as it is in the old-fashioned world?
Craig Newman
Re: Problems with scaling - MacOS
Hi mvillion,
1. welcome to the forum!
2. Check the "windowboundingrect" in the dictionary, I think this is the problem on the MB Air!
You can GET and also SET this property, so something like this might do the trick:
@ Craig,
we ARE talking about desktops here (iMac and MacBook Air)
Best
Klaus
1. welcome to the forum!

2. Check the "windowboundingrect" in the dictionary, I think this is the problem on the MB Air!
You can GET and also SET this property, so something like this might do the trick:
Code: Select all
on preopenstack
set the windowboundingrect to the screenrect
...
end preopenstack
we ARE talking about desktops here (iMac and MacBook Air)

Best
Klaus
Re: Problems with scaling - MacOS
Hi
Yes. I wrote the app on an iMac with LOTS of screen space. 1024 x 768 was the app size.
I want to run it on a Macbook Air. (Not iPad Air). The macbook is screen res of 1366 x 768 but the app is always cropped, even in full screen mode (all modes of full screen mode).
It has me stumped. Even setting scalefactor to 0.75 makes a smaller window but it is cropped as if it was full size (Which makes no sense at all)
Performing a few tests I have worked it out that it is cropping the screen at 707 [or there a bouts] (of 768). I do not know if that is significant.
I have uploaded a test stack that demonstrates this problem.
The stack is designed to show the issue on an 11 inch Airbook. It will probably work on a 13 inch as the screen size will probably fit it.
I expect if the stack size is expanded to the same as the 13 air book and the buttons moved to the bottom again, the issue will show itself again.
Matt
Yes. I wrote the app on an iMac with LOTS of screen space. 1024 x 768 was the app size.
I want to run it on a Macbook Air. (Not iPad Air). The macbook is screen res of 1366 x 768 but the app is always cropped, even in full screen mode (all modes of full screen mode).
It has me stumped. Even setting scalefactor to 0.75 makes a smaller window but it is cropped as if it was full size (Which makes no sense at all)
Performing a few tests I have worked it out that it is cropping the screen at 707 [or there a bouts] (of 768). I do not know if that is significant.
I have uploaded a test stack that demonstrates this problem.
The stack is designed to show the issue on an 11 inch Airbook. It will probably work on a 13 inch as the screen size will probably fit it.
I expect if the stack size is expanded to the same as the 13 air book and the buttons moved to the bottom again, the issue will show itself again.
Matt
Re: Problems with scaling - MacOS
Hi Matt,
You are not leaving room for stack decorations.
My screen is 1366 x 768 and the app doesn't really fit, lots of it is not hidden but off-screen.
Try;
That will show you the screen resolution after all the (Mac) toolbar thingies. mine is 1024 x 738. Even that size is no good because I lose the titlebar.
Also to check the user add;
That will ensure it's centered on the screen.
I wouldn't advise using scaleFactor as it does mess with some controls
I think I got it all,
Simon
You are not leaving room for stack decorations.
My screen is 1366 x 768 and the app doesn't really fit, lots of it is not hidden but off-screen.
Try;
Code: Select all
put the working screenRect
Also to check the user add;
Code: Select all
on openStack
set loc of this stack to the screenLoc
end openStack
I wouldn't advise using scaleFactor as it does mess with some controls
I think I got it all,
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Problems with scaling - MacOS
SOLVED
The app/stack was being resized when being run on the 11inch MacBook Air from 1024 x 768 to 1024 x 717, probably to accommodate the menu and dock.
SOLUTION 1 - Rescale app
SOLUTION 2 - Full Window
Thanks to all who provided the clues
The app/stack was being resized when being run on the 11inch MacBook Air from 1024 x 768 to 1024 x 717, probably to accommodate the menu and dock.
SOLUTION 1 - Rescale app
Code: Select all
--Set the scale factor
set the scalefactor of this stack to 0.75
--Resize the stack
set the height of this stack to 768
set the width of this stack to 1024
--Reposition the window
set the location of this stack to 512, 450
Code: Select all
--Resize the stack
set the height of this stack to 768
set the width of this stack to 1024
--Go full screen
set the fullscreenmode of this stack to "showAll"
set the fullscreen of this stack to true
set the windowboundingrect to the screenrect
Re: Problems with scaling - MacOS
Hi mvillion,,
to make the FULLSCRREN-FEELING complete you could also optionally add: hide menubar
That will hide the menu and dock on the Mac
To show again, yes, you guessed: show menubar
Best
Klaus
to make the FULLSCRREN-FEELING complete you could also optionally add: hide menubar
That will hide the menu and dock on the Mac

To show again, yes, you guessed: show menubar
Best
Klaus