Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1135.mcz==================== Summary ====================
Name: Morphic-nice.1135
Author: nice
Time: 4 May 2016, 11:19:13.406192 pm
UUID: 2efd252e-effa-4796-82fb-aa2db0644bba
Ancestors: Morphic-nice.1133, Morphic-mt.1133
Merge
=============== Diff against Morphic-nice.1133 ===============
Item was removed:
- ----- Method: DisplayText>>composeForm (in category '*Morphic-Text') -----
- composeForm
- "For the TT strings in MVC widgets in a Morphic world such as a progress bar, the form is created by Morphic machinery."
- | canvas tmpText |
- Smalltalk isMorphic
- ifTrue:
- [tmpText := TextMorph new contentsAsIs: text deepCopy.
- foreColor ifNotNil: [tmpText text addAttribute: (TextColor color: foreColor)].
- backColor ifNotNil: [tmpText backgroundColor: backColor].
- tmpText setTextStyle: textStyle.
- canvas := FormCanvas on: (Form extent: tmpText extent depth: 32).
- tmpText drawOn: canvas.
- form := canvas form.
- ]
- ifFalse: [form := self asParagraph asForm]!
Item was added:
+ ----- Method: MorphicProject>>composeDisplayTextIntoForm: (in category 'utilities') -----
+ composeDisplayTextIntoForm: displayText
+
+ | tmpText canvas |
+ tmpText := TextMorph new contentsAsIs: displayText text deepCopy.
+ displayText foregroundColor ifNotNil: [:color |
+ tmpText text addAttribute: (TextColor color: color)].
+ displayText backgroundColor ifNotNil: [:color |
+ tmpText backgroundColor: color].
+ tmpText setTextStyle: displayText textStyle.
+ canvas := FormCanvas on: (Form extent: tmpText extent depth: 32).
+ tmpText drawOn: canvas.
+ ^ canvas form!