<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Luciano,</p>
<p>Your reasoning sounds correct to me. Just pushed your change. If
someone complains, we'll see.</p>
<p>Thanks!</p>
<div class="moz-cite-prefix">On 2026-06-25 2:30 PM, Luciano
Notarfrancesco via Cuis-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAL5GDyoE0sTr3d__v7b8XDf3hs4O8uTMa2PqJ0Ea-XBSX1oe1A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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"
moz-do-not-send="true" class="moz-txt-link-freetext">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">
<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" moz-do-not-send="true">www.cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank"
moz-do-not-send="true">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank"
moz-do-not-send="true">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank"
moz-do-not-send="true">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich"
target="_blank" moz-do-not-send="true">patents.justia.com/inventor/juan-manuel-vuletich</a></pre>
</div>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
<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>