Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

clBtnFace coming up black, regardless

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro

I just noticed that on my system clBtnFace when used to draw on a canvas, always draws black. It displays fine inside the IDE, but after compile clBtnFace and clBtnShadow are both black.

The other colors seem to work fine.

Tony Maro Systems Consultant The Maro Group (256) 337-5759 http://www.maro.net/

Reply by email

Tony Maro
to Tony Maro
Tony Maro wrote 6 lines
I just noticed that on my system clBtnFace when used to draw on a canvas, always draws black. It displays fine inside the IDE, but after compile clBtnFace and clBtnShadow are both black. The other colors seem to work fine.

This is something with a recent (for me) cvs update. I just noticed that components I designed some time back are doing the same thing when drawing on the canvas. The compiled apps from before work fine, but newly compiled versions show as solid black.

This is Linux / GTK.

-Tony

Reply by email

Andrew Johnson
to Tony Maro: I just noticed that on my system clBtnFace when used to draw on a canvas, always draws…

I believe a few weeks ago I changed the BtnFace color to actually be the _Button_ face color. Aka if it is black thats the literal color of your button. Which can only mean you're using a pixmap theme afaik, and probably one which is inherently "broken" but whose brokenness doesn't cause problems in native widgets since they will directly call to the pixmap engine bypassing style colors entirely.

This is again where win32 compatibility and functions bite. I have not completely figured out what to do, though I started one solution of if using rectangle or fillrect with clForm it tries to call the theme function.

I am tempted to disallow "system" colors in general draw routines and supply some themed interface functions which interface XP functions on XP, simply do basic fill or draw line on 9x/2k/nt, and call the gtk_paint_* routines under gtk+. aka you wouldn't be able to use any system colors on any canvas at all you would have to do things like you would in real gtk, flat box fill or drawbox or.... whatever it might be. however the real functions get chosen.

No matter which way I change this value or behaviour currently something is going to be wrong or broken, because GTK simply doesn't work the same way as win32 nor vica-verca. The reason I changed it was because of that very reason.. I saw brokenness in several themes. LCL should not have to choose between different kinds of brokenness. :(

Andrew

Tony Maro wrote 5 lines
I just noticed that on my system clBtnFace when used to draw on a canvas, always draws black. It displays fine inside the IDE, but after compile clBtnFace and clBtnShadow are both black. The other colors seem to work fine.

Reply by email

Tony Maro
to Tony Maro: I just noticed that on my system clBtnFace when used to draw on a canvas, always draws…
Andrew Johnson wrote 7 lines
I believe a few weeks ago I changed the BtnFace color to actually be the _Button_ face color. Aka if it is black thats the literal color of your button. Which can only mean you're using a pixmap theme afaik, and probably one which is inherently "broken" but whose brokenness doesn't cause problems in native widgets since they will directly call to the pixmap engine bypassing style colors entirely.

Well, I ran some tests...

I logged out of my normal KDE environment and logged into Gnome (gee, I forgot how fast it opens by comparison.)

I tried my app = black.

I opened the Mandrake GTK theme manager and was currently running the standard Mandrake 9.1 Galaxy theme. I tried another theme, ran my app and it worked fine. I flipped back to Galaxy = black. Galaxy does not appear pixmapped for anything, however.

So I left my theme on one of the working ones, logged out, logged back into KDE and it's still black.

I tried changing KDE themes, to no avail (knew that wouldn't work, but tried anyway.)

How can I get my KDE to pick up the changed GTK theme? Or rather, where is my Lazarus app getting this setting from while I'm in KDE?

Thanks,

-Tony

Reply by email

Andrew Johnson
to Tony Maro: I just noticed that on my system clBtnFace when used to draw on a canvas, always draws…
Tony Maro wrote 21 lines
Andrew Johnson wrote: >I believe a few weeks ago I changed the BtnFace color to actually be the >_Button_ face color. Aka if it is black thats the literal color of your >button. Which can only mean you're using a pixmap theme afaik, and >probably one which is inherently "broken" but whose brokenness doesn't >cause problems in native widgets since they will directly call to the >pixmap engine bypassing style colors entirely. > Well, I ran some tests... I logged out of my normal KDE environment and logged into Gnome (gee, I forgot how fast it opens by comparison.) I tried my app = black. I opened the Mandrake GTK theme manager and was currently running the standard Mandrake 9.1 Galaxy theme. I tried another theme, ran my app and it worked fine. I flipped back to Galaxy = black. Galaxy does not appear pixmapped for anything, however.

galaxy is a poor excuse for a theme engine. half the values are hard coded into the engine the other half are in the gtkrc.. which means a good many values will come up wrong.. I have seen this is in more then just Lazarus, though it is not too common because most people will use standard values and not any sort of custom widget etc.

Show quoted text 9 lines
So I left my theme on one of the working ones, logged out, logged back into KDE and it's still black. I tried changing KDE themes, to no avail (knew that wouldn't work, but tried anyway.) How can I get my KDE to pick up the changed GTK theme? Or rather, where is my Lazarus app getting this setting from while I'm in KDE?

it _should_ be getting changed if the gtk values are updated properly. But since I don't use kde usually and its been awhile and I cannot be sure of it. I would try manually setting the ~/.gtkrc theme to one which doesn't have a problem in gnome and see if it is used while in kde.

Andrew

Reply by email