<div dir="ltr">I've been experimenting a bit and the attached change set seems to solve my problem. But I'm not sure if it breaks anyone elses code. The difference is 1) LayoutMorphs are initialized with color transparent instead of theme default window color; 2) if doAdoptWidgetColor is false, it does nothing (as opposed to setting the color to transparent). This way, unless doAdoptWidgetColor is true, the colors you set are never changed automatically. It seems to not make any difference in the way everything looks with the default theme or with my dark theme, but does it make sense for everyone? Or people (or people's already written code) expect the default color of LayoutMorphs to be the theme default window color?</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jun 23, 2026 at 1:30 AM Juan Vuletich <<a href="mailto:juan@cuis.st">juan@cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<p>Hi Luciano,</p>
<div>On 2026-06-22 5:10 AM, Luciano
Notarfrancesco via Cuis-dev wrote:<br>
</div>
<blockquote type="cite">
I still find the adoptWidgetColor mechanism confusing. It often
makes colors change in unexpected ways.</blockquote>
<p>Yes. It is crap.</p>
<blockquote type="cite">
<div dir="auto"><br>
<div dir="auto"><span style="font-size:inherit;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0);color:rgb(0,0,0)">Here’s
an example. I’d like to explicitly set a color for a layout
morph with color:, but how can I do that without the color
being later replaced here?</span></div>
<div dir="auto"><span style="font-size:inherit;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0);color:rgb(0,0,0)"><br>
</span></div>
<div dir="auto">LayoutMorph>><span style="font-size:inherit;border-color:rgb(255,255,255)">adoptWidgetsColor:
paneColor</span><br>
</div>
<div dir="auto">
<div style="font-size:inherit" dir="auto"> super
adoptWidgetsColor: paneColor.<br style="font-size:inherit">
adoptsWidgetsColor<br style="font-size:inherit">
ifTrue: [ self color: (Theme current
buttonColorFrom: color) ]<br style="font-size:inherit">
ifFalse: [ self color: `Color transparent` ]</div>
<div style="font-size:inherit" dir="auto"><br>
</div>
<div style="font-size:inherit" dir="auto">I’d like to make
this simpler, not more complicated by adding yet another
case. Eg, I wouldn’t want to change the doAdoptWidgetColor
ivar into a colorAdoptionPolicy to cover my use case, I’d
rather remove it completly and simplify it if that was
possible.</div>
</div>
</div>
</blockquote>
<p>Agreed!</p>
<blockquote type="cite">
<div dir="auto">
<div dir="auto">
<div style="font-size:inherit" dir="auto">I’m the only one who
thinks we should change this behaviour? How should we change
it? Or perhaps there’s already a way to get the behaviour I
want without changing anything?</div>
<div style="font-size:inherit" dir="auto"><br>
</div>
<div style="font-size:inherit" dir="auto">Thanks,</div>
<div style="font-size:inherit" dir="auto">Luciano</div>
<div style="font-size:inherit" dir="auto"><br>
</div>
</div>
</div>
</blockquote>
<p>No, we should find a better way.</p>
<p>A long time ago we added UI Themes to Cuis. For this to be
flexible and nice, we want to support 'external' definition of
base color for each kind of tool, and the various derived colors
for each widget. At that time, I came up with #adoptWidgetColor:
It was not a good solution. We should find a better one.</p>
<p>Thanks,</p>
<pre cols="72">--
Juan Vuletich
<a href="http://www.cuis.st" target="_blank">www.cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a></pre>
</div>
</blockquote></div>