[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Lost in colors
From: Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date: 2008-07-23 23:28:56
Message-ID: g68ero$8ue$1 () ger ! gmane ! org
[Download RAW message or body]
Xavier Vello wrote:
> I'm woking on a kioslave which outputs html to konqueror. I want the html page
> to be well integrated in the browser by using standard KDE color, but I'm
> really lost with KColorScheme, never getting the color I want.
Could you please elaborate on this (or better yet, suggest where the doc
could be improved)?
> Can you please
> tell me which KColorScheme methods I should use to get :
> - the background of a list
List = View... but for this you can use Base from the QPalette also.
KCS(state, KCS::View).background() // KCS::NormalBackground is default
...normaly you would want to use KStatefulBrush where appropriate, but
if you're generating html you don't have state; just use Active.
> - the background color of a hovered element of a list
> - the border color of a hovered widget
Hover color is KCS(state, set).decoration(KCS::HoverColor), for hover
effect see how it's done in konq/dolphin. Basically, you want to look at
KColorUtils::mix or KCU::tint. Note that KCS currently generates
backgrounds by the formula special=KCU::tint(bgNormal, fgSpecial, 0.4);
that might work for you.
--
Matthew
Microsoft has become the next IBM; a dinosaur struggling to survive in
the age of more able-to-adapt mammals (Linux and FLOSS). It remains to
be seen if they'll be able to adapt before they go extinct.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic