One Rect For All specificaiton

Sannyasin Brahmanathaswami brahma at hindu.org
Tue Jan 26 06:11:28 CET 2016


More results:

I was going “nuts” and results in the simulator seemed to depend on the time of day, current humidity and wind speed and position of the stars at any given moment…

making too many changes on each iteration is dangerous…

I narrowed it down:

setting the bottom of a control basedon the screenrect works when driving a 16 X 9 stack into  a 4X 3 iPad “viewport:”  using the simulator:

see other comments in line

if isMobile() then
      Set the fullScreenMode of this stack to "ShowAll"
      put the working ScreenRect into tScreenRect
      set the bottom of group "baseControls” to ( item 4 of tScreenRect +20)
      set the width of grc “BaseControlsBkgnd” to item 3 of tScreenRect # does not work why?

BUT:

      set the bottom of group "baseControls” to ( item 4 of tScreenRect +20)

fails in  a “real” test.. (build standalone for using 1200X675 stack for iPhone 6 plus) looks fine on the iPhone. place app on iPad and the the group “BaseControls” have not moved down as they do in iPad view in the simulator.

it gets worse:

      set the bottom of group "baseControls” to ( item 4 of tScreenRect +20)

will break your positioning for the bottom control when you output to the simulator going from you 16 X9 stack to a 16 X9 iPhone6 viewport OR build a real standalone with that in place, because the screenRect is wrongly reported.

see:

http://quality.livecode.com/show_bug.cgi?id=16763

(sigh) So….. Unless Colin comes in here with some magic simple solution…  Still no complete solution for positioning groups relative to the device screen edges using fullscreenmode “showAll”

you can be “blindsided” (as i was, over and over again) by the fact that “showAll” *will* pull in controls that are “below” screen e.g. if you set the stack to 4 X 3 and put controls at the bottom of the screen and do not try to set the bottom.. when you run out to iPhone 6+ those controls will be sitting on the bottom… you think “ahaha! we got it” but then if you have a control, that is position e.g. bottom 675  on the iPhone (bottom of screen)  it will *not* be moved down by showAll,

because showAll’s algoritm is simply “Make sure all content is included… so if the control would be off screen we go to a short height, then I will to pull it up and it still sticks to the bottom.. but if the control is on screen when we go to a shorter height… I  don’t have to do anything, and it stays where it is.”

The screen rect *could* help us… but it’s seems to have some bugs around it.  TBD…

This makes it “bad” for landscape design on 16 X 9 rendered on a 4 x 3… as your controls will "float in” off edge.

BR



On January 25, 2016 at 3:46:29 PM, Sannyasin Brahmanathaswami (brahma at hindu.org<mailto:brahma at hindu.org>) wrote:

and the control now falls in the middle of the card…almost as if they are setting bottom 320 relative to the card height of 675  and not relative to the screenRect height.


More information about the use-livecode mailing list