<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 14/05/2023 à 19:47, Paul D. Fernhout
via Cuis-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:22664f39-e7e1-2f6d-df41-702578c03253@kurtz-fernhout.com">
<div class="moz-text-flowed" style="font-size: 16px;"
lang="x-unicode">For an example related to Cuis and unexpected
complex behavior, I was debugging why the background color of
the experiment I worked on suddenly turned light brown as soon
as the window was rebuilt. It ultimately had to do with the
original LayoutMorphs having a transparent background color
somehow, but for some reasons the new ones the code made had a
light brown color. I could not easily figure out why that was
the case (like where the original LayoutMorph got its color
set). I spent a lot of time drilling down into the submorphs of
the window, past layers and layers of LayoutMorphs.
<br>
</div>
</blockquote>
<p>AFAIK, it is related to #adoptWidgetsColor: to have the option of
uniform color among widgets in a pane.</p>
<p>There is a doAdoptwidgetColor boolean attribute.<br>
</p>
<blockquote type="cite"
cite="mid:22664f39-e7e1-2f6d-df41-702578c03253@kurtz-fernhout.com">
<div class="moz-text-flowed" style="font-size: 16px;"
lang="x-unicode">
<br>
And my conclusion from all that debugging was that the idea of
an invisible LayoutMorph that Cuis uses is an anti-pattern. 😄
<br>
<br>
Those extra morphs made it harder to understand what was going
on when inspecting windows. I'd rather see morphs hold directly
onto their (visible) submorphs and hold onto a layout object of
some sort that moves submorphs around as needed. That would make
it easier to inspect a tree of (visible) morphs. To me, every
morph having an optional layout object to arrange submorphs also
would be simpler conceptually than having mysterious
invisible-sometimes morphs in between all other morphs, because
it would be a separation of concerns of layout from display.
With a replaceable layout object, people could also more easily
experiment with all sorts of layout options like Swing and HTML
have (like MiGLayout or FlexBox which I have found useful).
<br>
</div>
</blockquote>
<p>You need to layout morph where to insert the morphs. You may have
space separation between these morphs revealing the underneath
layout morph. You may want to experiment with the UI-Layout-Panel
and UI-Frame packages. Once installed in a Morph, called its menu
from its halo then select menu items Edit me |Edit my Layout Spec.
I found the tools difficult to use, but it may be just me.<br>
</p>
Hilaire<br>
<br>
<pre class="moz-signature" cols="72">--
GNU Dr. Geo
<a class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
</body>
</html>