--hardcoded colors in oxygen windeco, now the 'faux-shadow' border is actually darker than the window instead of hard-coded medium gray (which made it appear bright in e.g. Wonton Soup). Also add some 'if (0)' code for a different color choice that can hopefully be made available as an option in the future (I like it better anyway, but for now use boemann's gray).
svn path=/trunk/KDE/kdebase/workspace/; revision=742324icc-effect-5.14.5
parent
01bf6cbb4c
commit
650f963bb0
|
@ -340,18 +340,36 @@ void OxygenClient::paintEvent(QPaintEvent *e)
|
|||
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
|
||||
painter.setPen(QColor(210,210,210));
|
||||
painter.drawLine(QPointF(x+4, y-0.5), QPointF(x+w-4, y-0.5));
|
||||
painter.drawArc(QRectF(x-0.5, y-0.5, 11, 11),90*16, 90*16);
|
||||
painter.drawArc(QRectF(x+w-11+0.5, y-0.5, 11, 11), 0, 90*16);
|
||||
painter.setPen(QColor(180,180,180));
|
||||
painter.drawLine(QPointF(x-0.5, y+4), QPointF(x-0.5, y+h));
|
||||
painter.drawLine(QPointF(x+w+0.5, y+4), QPointF(x+w+0.5, y+h));
|
||||
painter.setPen(QColor(150,150,150));
|
||||
painter.drawArc(QRectF(0.5, y+h-11+0.5, 11, 11),180*16, 90*16);
|
||||
painter.drawArc(QRectF(x+w-11+0.5, y+h-11+0.5, 11, 11),270*16, 90*16);
|
||||
painter.setPen(QColor(130,130,130));
|
||||
painter.drawLine(QPointF(x+4, y+h+0.5), QPointF(x+w-4, y+h+0.5));
|
||||
if (0) { // TODO make option
|
||||
QColor shadow = helper_.calcShadowColor(color); // wrong, use kwin shadow color
|
||||
painter.setPen(OxygenHelper::alphaColor(shadow, 0.1));
|
||||
painter.drawLine(QPointF(x+4, y-0.5), QPointF(x+w-4, y-0.5));
|
||||
painter.drawArc(QRectF(x-0.5, y-0.5, 11, 11),90*16, 90*16);
|
||||
painter.drawArc(QRectF(x+w-11+0.5, y-0.5, 11, 11), 0, 90*16);
|
||||
painter.setPen(OxygenHelper::alphaColor(shadow, 0.3));
|
||||
painter.drawLine(QPointF(x-0.5, y+4), QPointF(x-0.5, y+h));
|
||||
painter.drawLine(QPointF(x+w+0.5, y+4), QPointF(x+w+0.5, y+h));
|
||||
painter.setPen(OxygenHelper::alphaColor(shadow, 0.4));
|
||||
painter.drawArc(QRectF(0.5, y+h-11+0.5, 11, 11),180*16, 90*16);
|
||||
painter.drawArc(QRectF(x+w-11+0.5, y+h-11+0.5, 11, 11),270*16, 90*16);
|
||||
painter.setPen(OxygenHelper::alphaColor(shadow, 0.55));
|
||||
painter.drawLine(QPointF(x+4, y+h+0.5), QPointF(x+w-4, y+h+0.5));
|
||||
}
|
||||
else if (1) { // TODO make option
|
||||
QColor shadow = KColorUtils::darken(color, 0.0, 0.0); // fully desaturate
|
||||
painter.setPen(KColorUtils::darken(shadow, 0.1));
|
||||
painter.drawLine(QPointF(x+4, y-0.5), QPointF(x+w-4, y-0.5));
|
||||
painter.drawArc(QRectF(x-0.5, y-0.5, 11, 11),90*16, 90*16);
|
||||
painter.drawArc(QRectF(x+w-11+0.5, y-0.5, 11, 11), 0, 90*16);
|
||||
painter.setPen(KColorUtils::darken(shadow, 0.3));
|
||||
painter.drawLine(QPointF(x-0.5, y+4), QPointF(x-0.5, y+h));
|
||||
painter.drawLine(QPointF(x+w+0.5, y+4), QPointF(x+w+0.5, y+h));
|
||||
painter.setPen(KColorUtils::darken(shadow, 0.4));
|
||||
painter.drawArc(QRectF(0.5, y+h-11+0.5, 11, 11),180*16, 90*16);
|
||||
painter.drawArc(QRectF(x+w-11+0.5, y+h-11+0.5, 11, 11),270*16, 90*16);
|
||||
painter.setPen(KColorUtils::darken(shadow, 0.55));
|
||||
painter.drawLine(QPointF(x+4, y+h+0.5), QPointF(x+w-4, y+h+0.5));
|
||||
}
|
||||
|
||||
painter.setPen(QPen(light, 1.2));
|
||||
painter.drawLine(QPointF(x+4, y+0.6), QPointF(x+w-4, y+0.6));
|
||||
|
|
Loading…
Reference in New Issue