From 1e4f84602a3bf3e2398770877c9d24772cff919a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 7 May 2008 17:08:38 +0000 Subject: [PATCH] Sync r803685 from oxygen. svn path=/trunk/KDE/kdebase/workspace/; revision=805134 --- clients/ozone/oxygenbutton.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/clients/ozone/oxygenbutton.cpp b/clients/ozone/oxygenbutton.cpp index ba2045c4d7..e474c5ac69 100644 --- a/clients/ozone/oxygenbutton.cpp +++ b/clients/ozone/oxygenbutton.cpp @@ -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);