From kde-devel Wed Jul 23 23:28:56 2008 From: Matthew Woehlke Date: Wed, 23 Jul 2008 23:28:56 +0000 To: kde-devel Subject: Re: Lost in colors Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=121685583429360 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 <<