Paul Ishenin wroteNo, you dont understand. Yes, on windows it works through an ifdef. But
? :-)
if they found a linux, osx solution they'll add it near with the same
I was not verbose enough. There is no linux/darwin solution, just fixed colors from palette not related to titlebar. Actually palette colors enumerate does not even have an entries for titlebar active/inactive, gradient active/inactive. They overwrite other enum functionality. All functionality is in getsyscolor and the DesktopPalette code is from an mdi -> do you want to create an mdi widget to be able to call this code ?? The palette is initialized with the palette from the mdi widget BTW.
Show quoted text 5 lines
ifdef. In any case GetDesktopPalette() will return colors I need.
And I think it is worse to use windows calls inside qt widgetset than
using a hack around qt since last guaranty we will get working
cross-platform solution.
-> it is not cross platform. There is none.
I needed to read/set titlebar color on Linux, all I could find was : read.write kde config file -> call dcop -Hhome -u user dcop kwin KWinInterface reconfigure (usable for my controlled clients, not usable as a general solution)
Everything in mdi::desktoppalette can done directly qt/pascal. In a procedure that is provided with a widget to initialize the palette from (no mdi):
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html X11 (V1.65) Temp Release for Mailing List
-> demo windowflags.pas has some new code (temporarily) just copy this file over to windows, compile and run it there -> tested on XP. on linux it does what it reads (return selection color)
....
Palette:=GetDesktopPalette(Handle);
Color:=QPalette_Color(Palette,QPaletteActive,QPaletteHighLight)^;
writeln('Active Title Bar=Active Highlight:','r:',QColor_red(@Color):3,' g:',QColor_green(@Color):3,' b:',QColor_blue(@Color):3);
Color:=QPalette_Color(Palette,QPaletteActive,QPaletteBase)^;
writeln('Active Gradient=Active Base:','r:',QColor_red(@Color):3,' g:',QColor_green(@Color):3,' b:',QColor_blue(@Color):3);
....
regards,
Den Jean