[Cuis-dev] Make label morphs replicate font and color of Text
Facundo Javier Gelatti
javiergelatti at gmail.com
Thu Nov 27 13:13:13 PST 2025
Hi!
I attach a change to make LabelMorphs copy the color and font family of
their Text content.
Here's an example you can use to see how it works now and after filing-in
the change:
TrueTypeFontFamily readAllTrueTypeFontsIn: DirectoryEntry
trueTypeFontsDirectory / 'AlexBrush'.
aText := Text string: 'hola' attributes: { TextColor blue. TextFontFamily
familyName: 'Alex Brush' }.
LabelMorph contents: aText :: openInHand
I also fixed a bug in Text>>#fontIfApplying:default:, where it failed if
defaultFont was nil (which was expected to be sometimes, because it
received #ifNil:).
Cheers!
Facu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251127/764ca1e3/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7722-CuisCore-FacundoJavierGelatti-2025Nov27-17h50m-FJG.001.cs.st
Type: application/vnd.sailingtracker.track
Size: 1258 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251127/764ca1e3/attachment-0001.st>
More information about the Cuis-dev
mailing list