[squeak-dev] [BUG] 5.3 Alpha: No Text formatting in tree morphs

Jakob Reschke forums.jakob at resfarm.de
Wed Oct 23 20:27:25 UTC 2019


Debugging this now:
0. The drawn items are IndentingListItemMorphs, which inherit from
StringMorph.
1. The emphasis var of the IndentingListItemMorph is set to 1 in 5.2, but
to 0 (default) in Trunk, after the item is initialized with the Text from
the model.
2. StringMorph>>initWithContents:font:emphasis: uses the contents: setter
in 5.2, but sets the instance variable directly in Trunk.
3. The emphasis is used in StringMorph>>fontToUse to look up a derivative
font, with bold setting in my case.

So in 5.2 the IndentingListItemMorph contents is a String and the emphasis
code is aligned with the emphasis of the first character in the Text label.
In Trunk, contents is the Text label itself (and its formatting is not
used) and the emphasis code is not set in accordance with the Text.

@Marcel: you changed the init method on 2019-08-30. Is it possible to
restore the previous behavior and still keep your functional fixes? This is
the Monticello version:

Name: Morphic-mt.1512
Author: mt
Time: 2 September 2019, 7:59:55.139688 am
UUID: 1feb80dc-74d2-2948-a7a1-0192335930f0
Ancestors: Morphic-mt.1511

Clean up StringMorph-related code which also moves some methods from
MorphicExtras and Etoys back to Morphic such as #fullPrintOn:

- Clean up font+emphasis behavior in StringMorph; not that StringMorphs
keep existing emphasis when a new font is set.
- MenuItemMorph did strange overrides of #hResizing and #vResizing -- I
suppose a performance hack from the old days
- No need for UpdatingStringMorph to duplicate implementation for
#contents: anymore
- Adds StringMorph >> #contentsFitted: (default) besides #contentsClipped:
to make these options more clear
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191023/92a34fbe/attachment.html>


More information about the Squeak-dev mailing list