From 82316c4893809bf72367eaf93f59985cc253829c Mon Sep 17 00:00:00 2001 From: "Daniel M. Duley" Date: Fri, 28 Apr 2000 09:56:45 +0000 Subject: [PATCH] Repaing fix for when inactive != active colors. svn path=/trunk/kdebase/kwin/; revision=47728 --- clients/modernsystem/modernsys.cpp | 19 ++++++++++++++++--- clients/modernsystem/modernsys.h | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/clients/modernsystem/modernsys.cpp b/clients/modernsystem/modernsys.cpp index 6295ba5441..b893c240fd 100644 --- a/clients/modernsystem/modernsys.cpp +++ b/clients/modernsystem/modernsys.cpp @@ -141,7 +141,7 @@ QSize ModernButton::sizeHint() const void ModernButton::reset() { - repaint(); + repaint(false); } void ModernButton::setBitmap(const unsigned char *bitmap) @@ -161,8 +161,10 @@ void ModernButton::drawButton(QPainter *p) if(iButtonPix) p->drawPixmap(0, 0, isDown() ? *iButtonPixDown : *iButtonPix); } - p->setPen(buttonFg); - p->drawPixmap(isDown() ? 4 : 3, isDown() ? 5 : 4, deco); + if(!deco.isNull()){ + p->setPen(buttonFg); + p->drawPixmap(isDown() ? 4 : 3, isDown() ? 5 : 4, deco); + } } void ModernSys::slotReset() @@ -453,4 +455,15 @@ void ModernSys::init() // } +void ModernSys::activeChange(bool) +{ + repaint(false); + button[0]->reset(); + button[1]->reset(); + button[2]->reset(); + button[3]->reset(); + if(button[4]) + button[4]->reset(); +} + diff --git a/clients/modernsystem/modernsys.h b/clients/modernsystem/modernsys.h index 6a76ce3e85..26fd9e0079 100644 --- a/clients/modernsystem/modernsys.h +++ b/clients/modernsystem/modernsys.h @@ -44,6 +44,7 @@ protected: void maximizeChange(bool m); void doShape(); void recalcTitleBuffer(); + void activeChange(bool); protected slots: void slotReset(); private: