[squeak-dev] The Trunk: ToolBuilder-Morphic-mt.291.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jan 30 19:21:07 UTC 2022
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.291.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.291
Author: mt
Time: 30 January 2022, 8:21:06.712695 pm
UUID: 7ac9373b-4061-a644-86d8-8fe5ce185a7a
Ancestors: ToolBuilder-Morphic-ct.290
Fixes ToolBuilder's initialization for text fields. The model can now report actual text with custom attributes the first time. Needs Graphics-mt.468, where #asNewTextStyle gets added on all font objects.
=============== Diff against ToolBuilder-Morphic-ct.290 ===============
Item was changed:
----- Method: MorphicToolBuilder>>buildPluggableText: (in category 'widgets required') -----
buildPluggableText: aSpec
| widget |
widget := self textPaneClass new.
aSpec stylerClass ifNotNil: [:c | widget styler: (c new view: widget)].
widget
on: aSpec model
text: aSpec getText
accept: aSpec setText
readSelection: aSpec selection
menu: aSpec menu.
+ aSpec font ifNotNil: [:f | widget textStyle: f asNewTextStyle].
- aSpec font ifNotNil: [:f | widget font: f].
widget readOnly: aSpec readOnly.
widget plainTextOnly: aSpec plainTextOnly.
widget editTextSelector: aSpec editText.
widget wantsFrameAdornments: aSpec indicateUnacceptedChanges.
widget askBeforeDiscardingEdits: aSpec askBeforeDiscardingEdits.
widget setProperty: #alwaysAccept toValue: aSpec askBeforeDiscardingEdits not.
widget wrapFlag: (aSpec softLineWrap ifNil: [true]).
self register: widget id: aSpec name.
widget getColorSelector: aSpec color.
widget getTextColorSelector: aSpec textColor.
self buildHelpFor: widget spec: aSpec.
self setFrame: aSpec frame in: widget.
self setLayoutHintsFor: widget spec: aSpec.
parent ifNotNil:[self add: widget to: parent].
^widget!
More information about the Squeak-dev
mailing list
|