[squeak-dev] The Trunk: ToolBuilder-Morphic-mt.294.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 7 10:20:20 UTC 2022


Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.294.mcz

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

Name: ToolBuilder-Morphic-mt.294
Author: mt
Time: 7 February 2022, 11:20:19.442414 am
UUID: 121b5fa3-cc43-ba4e-ac82-90a2b7f7cf77
Ancestors: ToolBuilder-Morphic-mt.293

Fixes regression regarding the vertical position of help text in pluggable text morphs.

=============== Diff against ToolBuilder-Morphic-mt.293 ===============

Item was changed:
  ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') -----
  drawBalloonTextOn: aCanvas 
+ 	"Show balloon text in the text morph if it has no contents. Catch errors to guard against broken models."
+ 
+ 	| helpText helpFont helpColor box |
- 	"Show balloon text in the text morph if it has no contents."
  	textMorph contents ifNotEmpty: [ ^ self ].
+ 	helpText := [ self balloonText ] on: Error do: [ :err | '<error in #balloonText>' ].
+ 	helpText ifNil: [ ^ self ].
+ 	
+ 	helpFont := self userInterfaceTheme balloonTextFont ifNil: [TextStyle defaultFont].
+ 	helpColor := self userInterfaceTheme balloonTextColor ifNil: [Color gray: 0.7].
+ 	
+ 	box := self innerBounds insetBy: (self textMorph margins ifNil: [0]).
+ 	box := box insetBy: (0 @ helpFont lineGapSlice corner: 0 at 0).
+ 	
+ 	aCanvas drawString: helpText in: box font: helpFont color: helpColor.!
- 	([ self balloonText ]
- 		on: Error
- 		do: [ : err | 'error in balloonText' ]) ifNotNil:
- 		[ : text | | font box |
- 			font := self userInterfaceTheme balloonTextFont ifNil: [TextStyle defaultFont].
- 			box := self bounds insetBy: (self textMorph margins ifNil: [0]).
- 			box := box insetBy: (0 @ font lineGapSlice corner: 0 at 0).
- 			aCanvas
- 				drawString: text
- 				in: box
- 				font: font 
- 				color: (self userInterfaceTheme balloonTextColor ifNil: [Color gray: 0.7]) ]!



More information about the Squeak-dev mailing list