[squeak-dev] The Trunk: Morphic-mt.1878.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Feb 9 13:44:08 UTC 2022
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1878.mcz
==================== Summary ====================
Name: Morphic-mt.1878
Author: mt
Time: 9 February 2022, 2:44:02.69878 pm
UUID: b09d1681-8fce-9143-934c-482d31fb579e
Ancestors: Morphic-mt.1877
Improves text support in button labels.
=============== Diff against Morphic-mt.1877 ===============
Item was changed:
----- Method: PluggableButtonMorph>>label: (in category 'accessing') -----
label: aStringOrTextOrMorph
label = aStringOrTextOrMorph ifTrue: [^ self].
label := aStringOrTextOrMorph isString
ifFalse: [aStringOrTextOrMorph asMorph]
ifTrue: [aStringOrTextOrMorph].
+
+ aStringOrTextOrMorph isText
+ ifTrue: [ "Allow custom formatting through clients. Fall back to button font."
+ label "aTextMorph" textStyle: self font asNewTextStyle].
+ aStringOrTextOrMorph isString
+ ifFalse: [ "Configure StringMorph with the correct font. See Object >> #asMorph."
+ (label respondsTo: #font:) ifTrue: [label font: self font]].
self updateMinimumExtent.
self changed.!
Item was changed:
----- Method: PluggableButtonMorph>>label:font: (in category 'accessing') -----
label: aStringOrTextOrMorph font: aFont
+ font := aFont. "Must set font first. See #label: and text support."
self label: aStringOrTextOrMorph.
+ !
- self font: aFont. !
More information about the Squeak-dev
mailing list
|