2015-05-01 23:54 GMT+02:00 Peter Uhnák <i.uh...@gmail.com>: > Thank's for the pointers. It seems to me that they access it via 'self > theme'; in any case my problem is, for the moment, solved. >
Yes but, 'self theme' is 'the theme engine that defines all theme settings' and 'self theme backgroundColor' is 'what this theme defines as general backgroundColor' It does not mean that self (the morph) is actually using this theme setting for anything. For a panel morph, that normally uses 'Color transparent' for its color, would answer to 'self theme backgroundColor' with the same answer as any other morph. It is the 'theme backgroundColor' not the morphs background color. > > Thanks, > Peter > > On Fri, May 1, 2015 at 11:11 PM, Nicolai Hess <nicolaih...@web.de> wrote: > >> >> >> 2015-05-01 22:22 GMT+02:00 Peter Uhnák <i.uh...@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 >>> >> >> >