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

Marcel Taeumel marcel.taeumel at hpi.de
Tue Nov 26 15:47:02 UTC 2019

Hi Jakob,

should work again in Morphic-mt.1594.

Am 25.10.2019 10:41:58 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Hi Jakob,

yes, the formatting of the first (text) character should be used for the entire (StringMorph) item just as it works in PluggableListMorphs. I will have a look at it.

Am 23.10.2019 22:27:53 schrieb Jakob Reschke <forums.jakob at resfarm.de>:
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/20191126/c2bd6815/attachment.html>

More information about the Squeak-dev mailing list