<div><div dir="auto">Sounds reasonable  :-)</div></div><div dir="auto"><br></div><div dir="auto"><br></div><div><div dir="auto">Best,</div><div dir="auto">Karl</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 7 Jul 2019 at 21:25, Patrick Rein <<a href="mailto:patrick.rein@hpi.uni-potsdam.de">patrick.rein@hpi.uni-potsdam.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That is not what this fix provides. If you have a PluggableTree and you return a Text with a TextColor as a label for list items the color will not be rendered. With the fix below this works without requiring special classes or callbacks. <br>
<br>
Bests<br>
Patrick<br>
<br>
Am 5. Juli 2019, 09:54, um 09:54, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>> schrieb:<br>
>Hi all! :-)<br>
><br>
>I double-checked this. I don't think it is necessary.<br>
><br>
>In IndentingListItemMorph >> #colorToUse, the last line falls back to<br>
>ListItemWrapper >> #preferredColor, which is the extension point for<br>
>models via PluggableTreeViewSpec >> #nodeClass:.<br>
><br>
>You can try by changing ListItemWrapper >> #preferredColor from "nil"<br>
>to "Color red". It just works as intended.<br>
><br>
>For the UI themes, I chose to use #color in instances<br>
>of IndentingListItemMorph to hold the current theme's text color for<br>
>items.<br>
><br>
>Best,<br>
>Marcel<br>
>Am 27.06.2019 14:16:17 schrieb <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a><br>
><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>>:<br>
>A new version of Morphic was added to project The Inbox:<br>
><a href="http://source.squeak.org/inbox/Morphic-pre.1491.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Morphic-pre.1491.mcz</a><br>
><br>
>==================== Summary ====================<br>
><br>
>Name: Morphic-pre.1491<br>
>Author: pre<br>
>Time: 27 June 2019, 2:15:55.295956 pm<br>
>UUID: 4b4c32a0-1907-0046-8d95-0b8adf1dcf6b<br>
>Ancestors: Morphic-pre.1489<br>
><br>
>Fixes a defect preventing colored line items in pluggable tree morphs.<br>
>The infrastructure was already in place (see StringMorph>>#contents:),<br>
>however, the ListMorph overrides the determined color later. This<br>
>changes this overriding to be more conservative to preserve any<br>
>pre-determined color.<br>
><br>
>=============== Diff against Morphic-pre.1489 ===============<br>
><br>
>Item was changed:<br>
>----- Method:<br>
>SimpleHierarchicalListMorph>>addMorphsTo:from:allowSorting:withExpandedItems:atLevel:<br>
>(in category 'private') -----<br>
>addMorphsTo: morphList from: aCollection allowSorting: sortBoolean<br>
>withExpandedItems: expandedItems atLevel: newIndent<br>
><br>
>| priorMorph newCollection firstAddition |<br>
>priorMorph := nil.<br>
>newCollection := (sortBoolean and: [sortingSelector notNil]) ifTrue: [<br>
>aCollection sorted: [ :a :b |<br>
>(a perform: sortingSelector) <= (b="" perform:=""><br>
>] ifFalse: [<br>
>aCollection<br>
>].<br>
>firstAddition := nil.<br>
>newCollection do: [:item |<br>
>priorMorph := self indentingItemClass basicNew<br>
>initWithContents: item<br>
>prior: priorMorph<br>
>forList: self<br>
>indentLevel: newIndent.<br>
>priorMorph<br>
>+ color: (priorMorph color ifNil: [self textColor]);<br>
>- color: self textColor;<br>
>font: self font;<br>
>selectionColor: self selectionColor;<br>
>selectionTextColor: self selectionTextColor;<br>
>hoverColor: self hoverColor;<br>
>highlightTextColor: self highlightTextColor;<br>
>filterColor: self filterColor;<br>
>filterTextColor: self filterTextColor.<br>
>firstAddition ifNil: [firstAddition := priorMorph].<br>
>morphList add: priorMorph.<br>
>((item hasEquivalentIn: expandedItems) or: [priorMorph isExpanded])<br>
>ifTrue: [<br>
>priorMorph isExpanded: true.<br>
>priorMorph<br>
>addChildrenForList: self<br>
>addingTo: morphList<br>
>withExpandedItems: expandedItems.<br>
>].<br>
>].<br>
>^firstAddition<br>
><br>
>!<br>
><br>
>Item was changed:<br>
>----- Method:<br>
>SimpleHierarchicalListMorph>>addSubmorphsAfter:fromCollection:allowSorting:<br>
>(in category 'private') -----<br>
>addSubmorphsAfter: parentMorph fromCollection: aCollection<br>
>allowSorting: sortBoolean<br>
><br>
>| priorMorph morphList newCollection |<br>
>priorMorph := nil.<br>
>newCollection := (sortBoolean and: [sortingSelector notNil]) ifTrue: [<br>
>aCollection sorted: [ :a :b |<br>
>(a perform: sortingSelector) <= (b="" perform:=""><br>
>] ifFalse: [<br>
>aCollection<br>
>].<br>
>morphList := OrderedCollection new.<br>
>newCollection do: [:item |<br>
>priorMorph := self indentingItemClass basicNew<br>
>initWithContents: item<br>
>prior: priorMorph<br>
>forList: self<br>
>indentLevel: parentMorph indentLevel + 1.<br>
>priorMorph<br>
>+ color: (priorMorph color ifNil: [self textColor]);<br>
>- color: self textColor;<br>
>font: self font;<br>
>selectionColor: self selectionColor;<br>
>selectionTextColor: self selectionTextColor;<br>
>hoverColor: self hoverColor;<br>
>highlightTextColor: self highlightTextColor;<br>
>filterColor: self filterColor;<br>
>filterTextColor: self filterTextColor.<br>
>morphList add: priorMorph.<br>
>].<br>
>scroller addAllMorphs: morphList after: parentMorph.<br>
>^morphList<br>
><br>
>!<br>
><br>
><br>
><br>
><br>
>------------------------------------------------------------------------<br>
<br>
<br>
</blockquote></div></div>