[Cuis-dev] LayoutMorph>>adoptWidgetColor:
Luciano Notarfrancesco
luchiano at gmail.com
Mon Jun 22 01:10:03 PDT 2026
I still find the adoptWidgetColor mechanism confusing. It often makes
colors change in unexpected ways.
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?
LayoutMorph>>adoptWidgetsColor: paneColor
super adoptWidgetsColor: paneColor.
adoptsWidgetsColor
ifTrue: [ self color: (Theme current buttonColorFrom: color) ]
ifFalse: [ self color: `Color transparent` ]
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.
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?
Thanks,
Luciano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260622/038cb69c/attachment.htm>
More information about the Cuis-dev
mailing list