better paint of the overlay

svn path=/trunk/KDE/kdelibs/; revision=927520
This commit is contained in:
Marco Martin 2009-02-17 19:07:47 +00:00
parent 760f5d5491
commit 0ee39c6ac2

View File

@ -2319,18 +2319,21 @@ void AppletOverlayWidget::paint(QPainter *painter,
Q_UNUSED(option)
Q_UNUSED(widget)
QColor wash = Plasma::Theme::defaultTheme()->color(Theme::BackgroundColor);
wash.setAlphaF(.8);
wash.setAlphaF(.7);
Applet *applet = qobject_cast<Applet *>(parentWidget());
QPainterPath backgroundShape;
if (applet->backgroundHints() & Applet::StandardBackground) {
backgroundShape = PaintUtils::roundedRectangle(parentWidget()->contentsRect(), 8);
backgroundShape = PaintUtils::roundedRectangle(parentWidget()->contentsRect(), 5);
} else {
backgroundShape = parentItem()->shape();
}
painter->save();
painter->setRenderHints(QPainter::Antialiasing);
painter->fillPath(backgroundShape, wash);
painter->restore();
}
} // Plasma namespace