[Lazarus] ColotToRGB in GTK apps
Valdas Jankūnas
skroblas at erdves.lt
Mon Jul 28 09:32:23 CEST 2008
Mattias Gaertner rašė:
> On Sun, 27 Jul 2008 15:26:34 +0300
> Valdas Jankūnas <skroblas at erdves.lt> wrote:
>
>> Hello,
>>
>> I found solution: in unit GtkProc is procedure UpdateSysColorMap
>> that updates SysColorMap array (from where ColorToRGB gets RGB values
>> of system colors), but functionality of this procedure is disabled
>> ("NewSysColors" is not defined). So i writed own procedure that based
>> on code of mentioned procedure. Now this procedure I call in OnCreate
>> and then ColorToRGB returns correct values.
>
> Thanks for the hint. I forgot that. I enabled it by default.
> This fixes the 'random' colors.
Thanks.
> But remember that the rest of my mail still holds true: These values
> depend on theme and not every theme defines all values. So don't expect
> that your program will work on every machine.
Yes, I understand that.
--
Valdas Jankūnas
More information about the Lazarus
mailing list