<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Luciano,</p>
<div class="moz-cite-prefix">On 2026-06-22 5:10 AM, Luciano
Notarfrancesco via Cuis-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAL5GDypijo+BBqhC_X9bgMmOxbD=t5wTOYBPSkc5MT6a5Pj7-A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
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"
cite="mid:CAL5GDypijo+BBqhC_X9bgMmOxbD=t5wTOYBPSkc5MT6a5Pj7-A@mail.gmail.com">
<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"
cite="mid:CAL5GDypijo+BBqhC_X9bgMmOxbD=t5wTOYBPSkc5MT6a5Pj7-A@mail.gmail.com">
<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 class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis.st">www.cuis.st</a>
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich</pre>
</body>
</html>