background-color of the lyrics-applet

Martin darklight.xdarklight at googlemail.com
Sun Oct 18 17:04:47 CEST 2009


Hi,

> ...It should be more like:
> QWidget *myFancyWidget(parent);
> QPalette pal = myFancyWidget->palette();
> QColor bg = pal.color(QPalette::Highlight);
> qreal value = bg.valueF() > 0.5 ? 1.0 : 0.1;
> bg.setHsvF( bg.hueF(), 0.07, value, bg.alphaF() );
> pal.setColor(QPalette::Highlight, bg);
> myFancyWidget->setPalette(pal);
> // and *especially*
> myFancyWidget->setBackgroundRole(QPalette::Highlight);
> myFancyWidget->setForegroundRole(QPalette::HighlightedText);

ok, I'm not good at that stuff :P
I tried to make amarok use your code... that's what I got:
[0] lyrics applet with the default color scheme (looks fine)
[1] lyrics applet with the Obsidian Coast color scheme (not perfect, buy MUCH 
better (in my opinion) than before :))

this is my implementation of your code: [2]

anyhow, I still have one question:
why are you using the 'Highlight' color as base color (which you are modifying 
then)?
wouldn't it be better to use the color schemes 'Background' color as base and 
modify that one?

also I think using the highlight color for a huge part of the interface (say 
you have the lyrics and the wiki applet in your context area) is a bad thing
you get two different colors for the main parts of the interface (main parts 
are: media sources, context and playlist)

Regards,
Martin

[0] http://www.abload.de/img/default-patchedo6bs.png
[1] http://www.abload.de/img/obsidiancoast-patched568g.png
[2] http://pastebin.ca/1627124


More information about the Amarok-devel mailing list