# HG changeset patch # User Claus Gittinger # Date 1573730537 -3600 # Node ID a2f591cb84051cb58a107b3ffad64a7b49048add # Parent c3fd02d2d9757223456ebe7e6cb2cd9405e31bf1 #UI_ENHANCEMENT by exept class: ShowMeHowItWorks changed: #showing:saying:do: diff -r c3fd02d2d975 -r a2f591cb8405 ShowMeHowItWorks.st --- 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.