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

commits at source.squeak.org commits at source.squeak.org
Fri Jan 10 20:18:13 UTC 2020


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.!



More information about the Squeak-dev mailing list