[Cuis-dev] background color of LayoutMorphs in a SystemWindow

Mark Volkmann r.mark.volkmann at gmail.com
Sun Feb 9 03:43:55 PST 2025


This is much better! Thanks Hilaire. I attached a new changeset with your
much simpler change.

On Sun, Feb 9, 2025 at 3:19 AM Hilaire Fernandes via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> I find the color scheme a bit confusing with Widget. Your interest is
> welcome. Nevertheless, adding a dedicated flag to each LayoutMorph (we have
> a lot) may be overkill and would add confusion to an already a bit
> confusing system - at least for me.
>
> Have you tried exploring the doAdoptWidgetsColor.
>
> When changing as this (change in line 4):
>
> 1
> 2
> 3
> 4
> 5
>
> LayoutMorph>>adoptWidgetsColor: paneColor
>     super adoptWidgetsColor: paneColor.
>     doAdoptWidgetsColor
>         ifTrue: [ self color: (Theme current buttonColorFrom: *color*) ]
>         ifFalse: [ self color: `Color transparent` ]
>
> Then your code example as (addition at line 3):
>
> 1
> 2
> 3
> 4
> 5
> 6
> 7
>
> window := SystemWindow new.column := window layoutMorph.column doAdoptWidgetsColor.column color: Color yellow.column addMorph: (LabelMorph contents: 'foo').column addMorph: (LabelMorph contents: 'bar').window openInWorld.
>
> This achieve what your are looking for without an additional variable. I
> have not explored much about the possible consequences.
>
> -- http://mamot.fr/@drgeo
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250209/6883099a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7045-CuisCore-MarkVolkmann-2025Feb09-05h40m-RMV.001.cs.st
Type: application/octet-stream
Size: 345 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250209/6883099a/attachment.obj>


More information about the Cuis-dev mailing list