Questions about screen and stack rectangle

Phil Davis revdev at pdslabs.net
Sat Jan 28 16:58:22 EST 2012


Pete,

Check out the windowBoundingRect - that might help.

Phil


On 1/28/12 1:15 PM, Pete wrote:
> 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!
>
>

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net





More information about the use-livecode mailing list