No static objects
svn path=/trunk/kdebase/kwin/; revision=93361
This commit is contained in:
parent
6ea629b81b
commit
12396373a2
1 changed files with 11 additions and 5 deletions
|
@ -49,7 +49,7 @@ static KPixmap *aBtnDown=0;
|
||||||
static KPixmap *iBtn=0;
|
static KPixmap *iBtn=0;
|
||||||
static KPixmap *iBtnDown=0;
|
static KPixmap *iBtnDown=0;
|
||||||
static bool pixmaps_created = false;
|
static bool pixmaps_created = false;
|
||||||
static QColor btnForeground;
|
static QColor *btnForeground;
|
||||||
|
|
||||||
static void create_pixmaps()
|
static void create_pixmaps()
|
||||||
{
|
{
|
||||||
|
@ -155,12 +155,12 @@ static void create_pixmaps()
|
||||||
p.end();
|
p.end();
|
||||||
|
|
||||||
if(qGray(options->color(Options::ButtonBg, true).rgb()) > 128)
|
if(qGray(options->color(Options::ButtonBg, true).rgb()) > 128)
|
||||||
btnForeground = Qt::black;
|
btnForeground = new QColor(Qt::black);
|
||||||
else
|
else
|
||||||
btnForeground = Qt::white;
|
btnForeground = new QColor(Qt::white);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NextClient::slotReset()
|
void delete_pixmaps()
|
||||||
{
|
{
|
||||||
delete aTitlePix;
|
delete aTitlePix;
|
||||||
delete iTitlePix;
|
delete iTitlePix;
|
||||||
|
@ -172,8 +172,14 @@ void NextClient::slotReset()
|
||||||
delete iBtn;
|
delete iBtn;
|
||||||
delete aBtnDown;
|
delete aBtnDown;
|
||||||
delete iBtnDown;
|
delete iBtnDown;
|
||||||
|
delete btnForeground;
|
||||||
|
|
||||||
pixmaps_created = false;
|
pixmaps_created = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void NextClient::slotReset()
|
||||||
|
{
|
||||||
|
delete_pixmaps();
|
||||||
create_pixmaps();
|
create_pixmaps();
|
||||||
button[0]->reset();
|
button[0]->reset();
|
||||||
button[1]->reset();
|
button[1]->reset();
|
||||||
|
@ -211,7 +217,7 @@ void NextButton::drawButton(QPainter *p)
|
||||||
else
|
else
|
||||||
p->drawPixmap(0, 0, isDown() ? *iBtnDown : *iBtn);
|
p->drawPixmap(0, 0, isDown() ? *iBtnDown : *iBtn);
|
||||||
|
|
||||||
p->setPen(btnForeground);
|
p->setPen(*btnForeground);
|
||||||
p->drawPixmap(isDown()? 5 : 4, isDown() ? 5 : 4, deco);
|
p->drawPixmap(isDown()? 5 : 4, isDown() ? 5 : 4, deco);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue