For your browser example, you probably want to use noScale. You just need to be 
sure you capture the rect at the right time. You don’t know the new rect until 
after the orientation changed handler ends. I’ll see if I can locate that stack 
example again that you put up. Unfortunately I can only test on iOS right now.

One good thing I discovered is that the content inside the browser widget is 
always native resolution (at least I thought so). So the only part of the 
screen that would have distortion would be the elements outside the widget if 
you used exactFit. It sounds like that was not the case for you though.

I agree... the fullScreenModes are most useful when you want the elements of 
the application to scale with the device size.

Thanks,
Brian
On Aug 18, 2018, 11:37 AM -0500, Sannyasin Brahmanathaswami via use-livecode 
<use-livecode@lists.runrev.com>, wrote:
> I have a similar issue with a stack that
>
> a) contains a browser that wants to fill the entire screen (of any device)
> b) a tool bar on the bottom, the background ( 50 px wide) which to set to 
> 2000 wide
> c) a 4 widget that appear on bottom on top to background.
>
> It should work on portrait and landscape
>
> That's it, not a complicated screen to layout, responsive... or so we 
> thought....
>
> Going around and around with this on support, I was using "show all"
> set at 414x736 (iPhone); and with Jacque's help to optimize my code
>
> This left pillar boxes left and right (show the stack/card color) on my 
> Android.
>
> Using all the "new methods"
>
> mobileSetFullScreenRectForOrientations "portrait,portrait upside 
> down","0,0,414,736"
>
> etc
>
> We were unable to gain programmatic control to use screenrect to fit the 
> device.
>
> My Guess/I am wrong, HQ could let us know:
>
> seems the fullscreenmode[what-Ever-It-Is] will, at an engine level will 
> override any attempt to do the simple "responsive" handlers of
>
> ========
>
> # snip the orientation changed handlers,
>
> # but it all comes down to this:
>
> put the screenrect into tRect
>
> set rect to widget "browser" to \
>
> (item 1 of the tRect, item 2 of the tRect, item 3 of tRect, item 4 of 
> tRect-50)
>
> ========
>
> Support said
>
> use fullscreenmode "exactFit"
>
> Jacque predicted it would fail, all kinds of distortion. I used tried it, 
> worked on the Pixel. (ratio of the widget at bottom barely noticeable) I 
> happily deployed to my "nightly" branch
>
> When I finally dug out an iPad to test--oh horror, Jacque was right -- the 
> widget and the bottom were all stretched out!
>
> So, I was stuck, went on another project, but I too would like to
>
> Ludovic THEBAULT wrote:
>
> How get the « real » rect of the stack ?
>
> is seems, if you want to do "responsive" design, that it will need to be done 
> *without* using fullscreenmode, and do it by handling the screenrect 
> yourself. Which defeats the purpose of fullScreenMode "help" for the 
> developer.
>
> @Andy I will try the effective Screenrect to see what we get.
>
> BR
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to