2015-05-01 22:22 GMT+02:00 Peter Uhnák <i.uhnak@gmail.com>:
Hi,
how is set the background color of a morph?
A morph has the fillStyle/color attribute, but this does not mean it uses this color for its drawing method. (for example ActiveHand color -> Color blue, and the hand/cursor is not blue).
I could access directly "Smalltalk ui theme backgroundColor" from within the Morph,
this returns always the same color, it is actually the desktop backgroundcolor.
but I don't see anywhere that something is using themed colors this way. So I assume there is some other way; what am I missing?
Note that I don't want to use the color for background of the morph but I need to make a decision based on the color in the morph.
It depends on the morph, or the type of widget this morph represents. A button has a theme dependent color, that may depend on the type and state (enabled/disabled) of the button. A list morph may have different colors for even and odd index, selected, enabled, disabled ... A label model font/color may depend on its use (window title/menu title/ button label ...). Look at the xxxFillStyleFor: messages in UITheme
Thanks, Peter