Fix buttons, patch by Knut Johansson <knutmj@online.no>.
svn path=/trunk/KDE/kdebase/workspace/; revision=913425icc-effect-5.14.5
parent
50ebf9e099
commit
42beacc8f1
|
@ -116,20 +116,20 @@ static inline const KDecorationOptions *options()
|
||||||
static void drawButtonFrame( QPixmap *pix, const QPalette &g, bool sunken )
|
static void drawButtonFrame( QPixmap *pix, const QPalette &g, bool sunken )
|
||||||
{
|
{
|
||||||
QPainter p;
|
QPainter p;
|
||||||
int x2 = pix->width() - 1;
|
int x2 = pix->width() - 3;
|
||||||
int y2 = pix->height() - 1;
|
int y2 = pix->height() - 3;
|
||||||
p.begin(pix);
|
p.begin(pix);
|
||||||
|
|
||||||
// titlebar button frame
|
// titlebar button frame
|
||||||
p.setPen( sunken ? g.color(QPalette::Dark).dark(155) : g.color(QPalette::Light));
|
p.setPen( sunken ? g.color(QPalette::Dark).dark(155) : g.color(QPalette::Light));
|
||||||
p.drawLine(0, 0, x2-1, 0);
|
p.drawLine(0, 0, x2, 0);
|
||||||
p.drawLine(0, 0, 0, y2-1);
|
p.drawLine(0, 0, 0, y2);
|
||||||
|
|
||||||
if (sunken)
|
if (sunken)
|
||||||
{
|
{
|
||||||
p.setPen( g.color(QPalette::Mid).dark(135) );
|
p.setPen( g.color(QPalette::Mid).dark(135) );
|
||||||
p.drawLine(1, 1, x2-2, 1);
|
p.drawLine(1, 1, x2-1, 1);
|
||||||
p.drawLine(1, 1, 1, y2-2);
|
p.drawLine(1, 1, 1, y2-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
p.setPen( sunken ? g.color(QPalette::Light) : g.color(QPalette::Mid).dark(135));
|
p.setPen( sunken ? g.color(QPalette::Light) : g.color(QPalette::Mid).dark(135));
|
||||||
|
|
Loading…
Reference in New Issue