Don't know if these masking fixes are necessary anymore now that QPixmap
is 'fixed' - but they don't do any harm, so they go in anyway. svn path=/trunk/kdebase/kwin/; revision=114434
This commit is contained in:
parent
2b5294278b
commit
b5c7e843fe
2 changed files with 10 additions and 2 deletions
|
@ -127,6 +127,11 @@ Button::setPixmap(const QPixmap & p)
|
||||||
aPixmap_.convertFromImage(aTx);
|
aPixmap_.convertFromImage(aTx);
|
||||||
iPixmap_.convertFromImage(iTx);
|
iPixmap_.convertFromImage(iTx);
|
||||||
|
|
||||||
|
if (0 != p.mask())
|
||||||
|
{
|
||||||
|
aPixmap_.setMask(*p.mask());
|
||||||
|
iPixmap_.setMask(*p.mask());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repaint();
|
repaint();
|
||||||
|
|
|
@ -198,8 +198,9 @@ Static::_createTexture(QPixmap & px, int t, bool active)
|
||||||
|
|
||||||
QColor c(options->color(Options::ColorType(t), active));
|
QColor c(options->color(Options::ColorType(t), active));
|
||||||
|
|
||||||
QRgb light(c.light(110).rgb());
|
QRgb mid (c.rgb());
|
||||||
QRgb dark (c.dark(110).rgb());
|
QRgb light (c.light(110).rgb());
|
||||||
|
QRgb dark (c.dark(110).rgb());
|
||||||
|
|
||||||
QRgb * data(reinterpret_cast<QRgb *>(texture.bits()));
|
QRgb * data(reinterpret_cast<QRgb *>(texture.bits()));
|
||||||
|
|
||||||
|
@ -208,6 +209,8 @@ Static::_createTexture(QPixmap & px, int t, bool active)
|
||||||
data[x] = light;
|
data[x] = light;
|
||||||
else if (data[x] == b)
|
else if (data[x] == b)
|
||||||
data[x] = dark;
|
data[x] = dark;
|
||||||
|
else
|
||||||
|
data[x] = mid;
|
||||||
|
|
||||||
px.convertFromImage(texture);
|
px.convertFromImage(texture);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue