[squeak-dev] The Inbox: Morphic-ct.1616.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Jan 10 20:19:49 UTC 2020


This is small enough to go into 5.3, or do you see any possible issues?

Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Freitag, 10. Januar 2020 21:18:13
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: Morphic-ct.1616.mcz

Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1616.mcz

==================== Summary ====================

Name: Morphic-ct.1616
Author: ct
Time: 10 January 2020, 9:18:04.681555 pm
UUID: 9b47b0c2-2b44-9647-9fc0-61b8ebaf053f
Ancestors: Morphic-mt.1615

Fixes a bug in NewBalloonMorph that leads to permanent flashing when the balloon is very high and does not fit to the left of the balloon.

Example to reproduce:

Morph new
        balloonText: 'Squeak is ' , (((1 to: 1000) gather: [:i | 'very ']) as: String) , ' cool';
        position: 10 @ 100;
        openInWorld.

=============== Diff against Morphic-mt.1615 ===============

Item was changed:
  ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category 'initialization') -----
  popUpAt: point forHand: aHand
         "Pop up the receiver as balloon help for the given hand"

+        #(bottomLeft topLeft bottomRight topRight)
+                detect: [:nextOrientation |
+                        | pointWithOffset |
+                        self orientation: nextOrientation.
+                        pointWithOffset := point + self tailOffset.
+                        self move: pointWithOffset.
+                        self bounds: (self bounds translatedToBeWithin: aHand world bounds).
+                        (self bounds perform: self orientation) = pointWithOffset]
+                ifNone: ["Keep last try."
+                        "Avoid popping up under the cursor - this would make the receiver flash infinitely."
+                        (self bounds containsPoint: aHand position)
+                                ifTrue: [self left: aHand x + 1]].
-        #(bottomLeft topLeft bottomRight topRight) detect: [:nextOrientation |
-                | pointWithOffset |
-                self orientation: nextOrientation.
-                pointWithOffset := point + self tailOffset.
-                self move: pointWithOffset.
-                self bounds: (self bounds translatedToBeWithin: aHand world bounds).
-                (self bounds perform: self orientation) = pointWithOffset] ifNone: ["Keep last try."].

         aHand world addMorphFront: self.
         aHand resetBalloonHelp: self.!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200110/3b4114e9/attachment.html>


More information about the Squeak-dev mailing list