Questions about screen and stack rectangle

Pete pete at mollysrevenge.com
Sat Jan 28 16:15:09 EST 2012


I'm in the midst of dealing with adjusting stack sizes to fit within the
user's screen resolution.  I guess I'm looking for confirmation of a few
things since I've made assumptions in the past that turned out to be wrong!

Starting with the screenRect.  Dictionary says the working screenRect takes
account of screen decorations.  On a Mac, looks like that means the system
menu bar at the top of the screen (22 pixels).  It also mentions the dock,
but unless the dock is specified to be permanently visible it only allows 4
pixels for it.  If the dock is always visible, then it does seem to take
that into account.

Next I'm looking at the rectangle of a stack. Once again taking the
dictionary definition, it says a stack's rectangle is relative to the top
and left of the screen.  However, if I create a stack that is the full
height of the screen, with it's top aligned with the bottom of the Mac
system menu bar, the top of the stack  is reported to be 44, whereas the
working screenRect top is 22.  I'm concluding that the stack rectangle is
measured from the bottom of the stack decorations bar.

Finally, I'm wondering how running on a Windows machine affects any of
this.  For example, Windows includes a menu bar at the top of each window
right underneath the decorations bar.  Is the width of that menu bar taken
into account in the stack's rectangle, in addition to the decorations bar?

Thanks for any confirmation/enlightenment!


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list