[Lazarus] Colourful Themes

zeljko zeljko at holobit.net
Mon May 12 07:16:20 CEST 2014


On 05/11/2014 08:08 PM, Vojtěch Čihák wrote:
> Hello,
>
> I've got one question. Would it be possible to have colors in Themes? Now, when I set color of buttons to -for example- yellow, then TButton and TBitBtn are yellow while TSpeeddBtn remains "default". It is case of Qt4 and GTK2, while (unluckily) in Windows (Wine) it does not work with any of buttons.
>
> Currently, there is (Themes.TThemeServices):
>
> procedure DrawElement(DC: HDC; Details: TThemedElementDetails; const R: TRect; ClipRect: PRect = nil); virtual;
>
> I think simply overload this method with one which will have one additional parameter - TColor.

hm...I don't think that color param is needed. If you set 
TWidgetSet.SetBgColor() DC brush is setted up to that color, so DC have 
information about brush color and can pass it to theme drawer (if ws 
supports overriding default theme brush).

> Are widgetsets capable do it? I mean if there is support in libQT4pas and other bindings.

Qt can do that, don't know abot others.

zeljko







More information about the Lazarus mailing list