Repaing fix for when inactive != active colors.
svn path=/trunk/kdebase/kwin/; revision=47728
This commit is contained in:
parent
5fceccc02d
commit
82316c4893
2 changed files with 17 additions and 3 deletions
|
@ -141,7 +141,7 @@ QSize ModernButton::sizeHint() const
|
||||||
|
|
||||||
void ModernButton::reset()
|
void ModernButton::reset()
|
||||||
{
|
{
|
||||||
repaint();
|
repaint(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModernButton::setBitmap(const unsigned char *bitmap)
|
void ModernButton::setBitmap(const unsigned char *bitmap)
|
||||||
|
@ -161,8 +161,10 @@ void ModernButton::drawButton(QPainter *p)
|
||||||
if(iButtonPix)
|
if(iButtonPix)
|
||||||
p->drawPixmap(0, 0, isDown() ? *iButtonPixDown : *iButtonPix);
|
p->drawPixmap(0, 0, isDown() ? *iButtonPixDown : *iButtonPix);
|
||||||
}
|
}
|
||||||
p->setPen(buttonFg);
|
if(!deco.isNull()){
|
||||||
p->drawPixmap(isDown() ? 4 : 3, isDown() ? 5 : 4, deco);
|
p->setPen(buttonFg);
|
||||||
|
p->drawPixmap(isDown() ? 4 : 3, isDown() ? 5 : 4, deco);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModernSys::slotReset()
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ protected:
|
||||||
void maximizeChange(bool m);
|
void maximizeChange(bool m);
|
||||||
void doShape();
|
void doShape();
|
||||||
void recalcTitleBuffer();
|
void recalcTitleBuffer();
|
||||||
|
void activeChange(bool);
|
||||||
protected slots:
|
protected slots:
|
||||||
void slotReset();
|
void slotReset();
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue