Repaing fix for when inactive != active colors.

svn path=/trunk/kdebase/kwin/; revision=47728
This commit is contained in:
Daniel M. Duley 2000-04-28 09:56:45 +00:00
parent 5fceccc02d
commit 82316c4893
2 changed files with 17 additions and 3 deletions

View file

@ -141,7 +141,7 @@ QSize ModernButton::sizeHint() const
void ModernButton::reset()
{
repaint();
repaint(false);
}
void ModernButton::setBitmap(const unsigned char *bitmap)
@ -161,9 +161,11 @@ void ModernButton::drawButton(QPainter *p)
if(iButtonPix)
p->drawPixmap(0, 0, isDown() ? *iButtonPixDown : *iButtonPix);
}
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();
}

View file

@ -44,6 +44,7 @@ protected:
void maximizeChange(bool m);
void doShape();
void recalcTitleBuffer();
void activeChange(bool);
protected slots:
void slotReset();
private: