[lazarus] GTK+ Theme colors

Michal Bukovjan bukovjan at mbox.dkm.cz
Mon Sep 16 16:26:05 EDT 2002

Andrew Johnson wrote:

> On Fri, 13 Sep 2002 23:49:00 -0500
> "Tony Maro" <TonyM at nlisc.com> wrote:
>> I want my new control to use the local GTK+ theme when it displays.  
>> I tried defining colors for drawing objects using things like 
>> clWindow and cl3dlight but it gives me standard Windows colors with 
>> that.
>> How can I make my new control use the GTK theme colors of whatever 
>> system the app is run on?
> Just FYI, I have almost got the basics working theme dependantly,  
> clBtnFont, clBtnface, clBtnShadow, clBtnHighlight, and clGrayText work 
> for Brush's. Unfortunately I Have not figured out how to make Pen's 
> work this way yet, because Pixmaps are ignored by Pen Styles. But If I 
> can get some more of the other commonly used colors working, you 
> should be able to get at least FillRect etc.. to match by using these 
> SysColors. I will also be trying the same with background color and 
> Text Color, so that Fonts and Form Backgrounds will also work this way 
> whenever possible. As soon as I get the bugs worked out, I will be 
> sending in a small patch with these changes, hopefully by wed. which 
> will enabled you to make at least some of your component work properly 
> without having to enable the newsyscolors flag.
> Andrew
Sounds great!

FYI, it should be possible to support pixmap themes as well (somehow), 
as TForm, TButton and others have Bitmap properties in Kylix...


More information about the Lazarus mailing list