setting tooltip colors

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Oct 9 18:39:29 BST 2007


Matthew Woehlke wrote:
> It came to my attention (1) that AFAIK (also tested by jpwhiting) KDE 
> doesn't actually /set/ tooltip colors yet. As I recall, setting them 
> means calling a Qt method, i.e. I am not sure if we can enforce KDE's 
> color preference for non-KDE applications. Anyway, this will require a 
> change in libs; unless someone has a better idea, I guess it will mean 
> setting the colors in KGlobalSettings::createApplicationPalette.

I blame Matthias Kretz, but it came up on IRC that possibly KStyle could 
also set the colors. This would enable all Qt-only apps to have the 
right colors if a KStyle is being used (since it seems that otherwise 
the above is correct, i.e. this would only work for applications that 
call KGS::createApplicationPalette). This would also encourage moving a 
bunch of DTRT code from Oxygen to KStyle (such as reacting to KDE's 
palette changed signal, and owning a non-application KConfig pointer).

The most obvious problem is not overriding the palette if it has been 
changed by the application. This might be do-able by not setting the 
palette if it has been changed from 'what it should be', where this 
value is initialized to the Qt hardcoded defaults, and set to whatever 
we change it to. This way we detect changes both before and after the 
KStyle ctor.

Comments?

-- 
Matthew
morphir: so much confusion :S kmake, kdemake, qmake make cmake etc.
logixoul: you forgot cmakekde :)
morphir: and bakemeacake





More information about the kde-core-devel mailing list