ScreenRect bug or not

Richard Gaskin ambassador at fourthworld.com
Tue Jun 3 20:47:07 CEST 2014


Terence Heaford wrote:

 > On 3 Jun 2014, at 19:10, Richard Gaskin wrote:
 >>
 >> In all xTalks "the rect" of a stack refers only to its content
 >> region.
...
 >> LiveCode now does this for us with "the effective rect", which
 >> accounts for the platform-specific window trimmings (title bar,
 >> borders, etc.).
 >
 >
 > This script
 >
 >   put "the working screenRect = " & the working screenRect
 >   put return & "the effective working screenRect = " & tRect after msg
 >   put return & "the screenRect = " & the screenRect after msg
 >
 > Places the following in the msg box
 >
 > the working screenRect = 0,22,1680,1046
 > the effective working screenRect = 0,22,1680,1046
 > the screenRect = 0,0,1680,1050
 >
 > If I now "set the rect of this stack to 0,22,1680,1046" then window
 > top bar that contains the traffic lights is hidden beneath the Mac
 > Menubar.
 >
 > If I change it to "set the rect of this stack to 0,44,1680,1046” then
 > the traffic lights are positioned correctly below the Mac Menubar.

And if you set "the effective rect" of the stack:

   set the effective rect of this stack to the working screenrect

..you get the placement you're looking for without having to know the 
OS-specific window trimming metrics.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list