#OTHER by mawalch
Spelling and grammar fixes.
--- a/SimpleView.st Wed May 24 22:29:46 2017 +0200
+++ b/SimpleView.st Tue May 30 17:53:00 2017 +0200
@@ -3028,8 +3028,8 @@
!
makeFullyVisible
- "make sure, that the view is fully visible by shifting it
- into the visible screen area if nescessary."
+ "make sure that the view is fully visible by shifting it
+ into the visible screen area if necessary."
|myDevice originVisible cornerVisible newTop newLeft deviceBounds
deviceLeft deviceRight deviceTop deviceBottom origin corner
@@ -3047,19 +3047,19 @@
cornerVisible := myDevice pointIsVisible:corner.
(myDevice pointsAreOnSameMonitor:origin and:corner) ifTrue:[
- referencePoint := origin.
+ referencePoint := origin.
] ifFalse:[
- originVisible ifTrue:[
- "origin is visible"
- referencePoint := origin.
- ] ifFalse:[
- cornerVisible notNil ifTrue:[
- "corner is visible"
- referencePoint := corner.
- ] ifFalse:[
- referencePoint := 1@1.
- ].
- ].
+ originVisible ifTrue:[
+ "origin is visible"
+ referencePoint := origin.
+ ] ifFalse:[
+ cornerVisible notNil ifTrue:[
+ "corner is visible"
+ referencePoint := corner.
+ ] ifFalse:[
+ referencePoint := 1@1.
+ ].
+ ].
].
deviceBounds := myDevice monitorBoundsAt:referencePoint.
@@ -3072,43 +3072,44 @@
cornerVisible ifTrue:[ deviceBottom := deviceBottom min:(myDevice usableHeightAt:corner) ].
corner y > deviceBottom ifTrue:[
- cornerVisible := false.
+ cornerVisible := false.
].
UserPreferences current forceWindowsIntoMonitorBounds ifFalse:[
- (originVisible and:[cornerVisible]) ifTrue:[^ self].
+ (originVisible and:[cornerVisible]) ifTrue:[^ self].
].
"/ deviceRight := deviceRight min:device usableWidth.
originVisible ifFalse:[
- cornerVisible ifFalse:[
- newTop := deviceBottom - height.
- newLeft := deviceRight - width.
- newLeft := newLeft max:deviceLeft.
- newTop := newTop max:deviceTop.
- ] ifTrue:[
- "/ origin is not; corner is in
- newLeft := (deviceLeft max:newLeft).
- newTop := (deviceTop max:newTop).
- ].
+ cornerVisible ifFalse:[
+ newTop := deviceBottom - height.
+ newLeft := deviceRight - width.
+ newLeft := newLeft max:deviceLeft.
+ newTop := newTop max:deviceTop.
+ ] ifTrue:[
+ "/ origin is not; corner is in
+ newLeft := (deviceLeft max:newLeft).
+ newTop := (deviceTop max:newTop).
+ ].
] ifTrue:[
- "/ notice, the position-dependent query: if there is a higher secondary screen,
- "/ this makes a difference in where a popUpMenu is allowed...
- (corner y > deviceBottom) ifTrue:[
- newTop := deviceBottom - height
- ].
- (corner x > deviceRight) ifTrue:[
- newLeft := deviceRight - width
- ].
- newLeft := newLeft max:deviceLeft.
- newTop := newTop max:deviceTop.
+ "/ notice, the position-dependent query: if there is a higher secondary screen,
+ "/ this makes a difference in where a popUpMenu is allowed...
+ (corner y > deviceBottom) ifTrue:[
+ newTop := deviceBottom - height
+ ].
+ (corner x > deviceRight) ifTrue:[
+ newLeft := deviceRight - width
+ ].
+ newLeft := newLeft max:deviceLeft.
+ newTop := newTop max:deviceTop.
].
((newTop ~~ top) or:[newLeft ~~ left]) ifTrue:[
- self origin:newLeft @ newTop
+ self origin:newLeft @ newTop
].
"Modified: / 27-10-2012 / 13:15:58 / cg"
+ "Modified (comment): / 30-05-2017 / 17:42:51 / mawalch"
!
makeRoundViewShapeWithBorder:bw