--- a/ShowMeHowItWorks.st Thu Nov 14 12:10:56 2019 +0100
+++ b/ShowMeHowItWorks.st Thu Nov 14 12:22:17 2019 +0100
@@ -457,15 +457,32 @@
messageView := ActiveHelpView for:xLatedMessage.
"/ messageView shapeStyle:#cartoon.
[
- |p top left bot right w h|
+ |p top left bot right w h screen screenBounds|
w := messageView preferredExtent x.
h := messageView preferredExtent y.
- p := Screen current pointerPosition.
+ screen := Screen current.
+
+ p := screen pointerPosition.
+ screenBounds := screen monitorBoundsAt:p.
+
left := p x. top := p y.
+ "/ try not to cover the thing we want to describe
+ left := left + 50.
+ top := top + 50.
+
bot := top + h. right := left + w.
+ right > screenBounds right ifTrue:[
+ right := screenBounds right.
+ left := right - w.
+ ].
+ bot > screenBounds bottom ifTrue:[
+ bot := screenBounds bottom.
+ top := bot - h.
+ ].
+
messageView origin:(left @ top).
messageView makeFullyVisible.
messageView realize.