WindowBuilder.st
changeset 4456 e059fcc5f0b3
parent 4244 b60f87ce9eda
equal deleted inserted replaced
4455:93ed941728ff 4456:e059fcc5f0b3
  1512             (newOrigin y + window height) > monitorBounds bottom ifTrue:[
  1512             (newOrigin y + window height) > monitorBounds bottom ifTrue:[
  1513                 y := monitorBounds bottom - window height - 20.
  1513                 y := monitorBounds bottom - window height - 20.
  1514                 newOrigin := newOrigin x @ y.
  1514                 newOrigin := newOrigin x @ y.
  1515             ].
  1515             ].
  1516             usableHeight := windowsDevice usableHeightAt:newOrigin+window extent.
  1516             usableHeight := windowsDevice usableHeightAt:newOrigin+window extent.
  1517             (newOrigin y + window height) > usableHeight ifTrue:[
  1517             (newOrigin y + window height) > (monitorBounds top + usableHeight) ifTrue:[
  1518                 y := usableHeight - window height - 20.
  1518                 "if window doesn't fit, place it at (or near) the top of the monitor"
       
  1519                 y := monitorBounds top + usableHeight - window height - 20.
  1519                 newOrigin := newOrigin x @ y.
  1520                 newOrigin := newOrigin x @ y.
  1520             ].
  1521             ].
  1521         ].
  1522         ].
  1522         window origin:newOrigin.
  1523         window origin:newOrigin.
  1523         type == #toolDialog ifTrue:[
  1524         type == #toolDialog ifTrue:[