Set palette's currentColorGroup since apparently kwin doesn't give us one with the right color group. This fixes the bug where the oxygen windeco always uses the inactive colors.
Is this something that can be fixed in kwin? CCMAIL: kwin@kde.org svn path=/trunk/KDE/kdebase/workspace/; revision=710741
This commit is contained in:
parent
de06840f80
commit
9fc9231483
1 changed files with 9 additions and 2 deletions
|
@ -14,10 +14,8 @@
|
|||
|
||||
#include <kconfig.h>
|
||||
#include <kglobal.h>
|
||||
#include <kglobalsettings.h>
|
||||
#include <klocale.h>
|
||||
#include <kdebug.h>
|
||||
#include <kcolorscheme.h>
|
||||
|
||||
#include <qbitmap.h>
|
||||
#include <qlabel.h>
|
||||
|
@ -460,6 +458,15 @@ void OxygenClient::paintEvent(QPaintEvent *e)
|
|||
QPalette palette = widget()->palette();
|
||||
QPainter painter(widget());
|
||||
|
||||
// ### - This feels like a kwin bug; the palette we get back always seems
|
||||
// to be (incorrectly) using the Inactive group, which is wrong; active
|
||||
// windows should have currentColorGroup() == Active. So, hack around it...
|
||||
// I don't think a window can be disabled?
|
||||
if (isActive())
|
||||
palette.setCurrentColorGroup(QPalette::Active);
|
||||
else
|
||||
palette.setCurrentColorGroup(QPalette::Inactive);
|
||||
|
||||
QRect title(titlebar_->geometry());
|
||||
|
||||
int x,y,w,h;
|
||||
|
|
Loading…
Reference in a new issue