Sync r803685 from oxygen.

svn path=/trunk/KDE/kdebase/workspace/; revision=805134
This commit is contained in:
Luboš Luňák 2008-05-07 17:08:38 +00:00
parent e45c3073a0
commit 1e4f84602a

View file

@ -159,7 +159,16 @@ void OxygenButton::paintEvent(QPaintEvent *)
QPalette pal = palette(); // de-const-ify
helper_.renderWindowBackground(&painter, this->rect(), this);
// Set palette to the right group.
// TODO - fix KWin to do this for us :-).
if (client_.isActive())
pal.setCurrentColorGroup(QPalette::Active);
else
pal.setCurrentColorGroup(QPalette::Inactive);
// widget->window()setPalette(pal);
helper_.renderWindowBackground(&painter, this->rect(), this, pal);
if (type_ == ButtonMenu) {
// we paint the mini icon (which is 16 pixels high)
@ -169,12 +178,6 @@ void OxygenButton::paintEvent(QPaintEvent *)
return;
}
// Set palette to the right group.
// TODO - fix KWin to do this for us :-).
if (client_.isActive())
pal.setCurrentColorGroup(QPalette::Active);
else
pal.setCurrentColorGroup(QPalette::Inactive);
if(client_.maximizeMode() == OxygenClient::MaximizeRestore)
painter.translate(0,-1);