From e3a83e67a27db0fdf40bc4a96d4613fcbe5cb3d9 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 11 Mar 2009 07:34:17 +0000 Subject: added subtle transparency for tooltips svn path=/trunk/KDE/kdebase/apps/; revision=938051 --- src/tooltips/kformattedballoontipdelegate.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/tooltips/kformattedballoontipdelegate.cpp') diff --git a/src/tooltips/kformattedballoontipdelegate.cpp b/src/tooltips/kformattedballoontipdelegate.cpp index 140c90ef4..a897d8312 100644 --- a/src/tooltips/kformattedballoontipdelegate.cpp +++ b/src/tooltips/kformattedballoontipdelegate.cpp @@ -51,14 +51,17 @@ void KFormattedBalloonTipDelegate::paint(QPainter *painter, const KStyleOptionToolTip *option, const KToolTipItem *item) const { + QColor toColor = option->palette.brush(QPalette::ToolTipBase).color(); + QColor fromColor = KColorScheme::shade(toColor, KColorScheme::LightShade, 0.2); + QPainterPath path = createPath(*option); if (haveAlphaChannel()) { painter->setRenderHint(QPainter::Antialiasing); painter->translate(.5, .5); + toColor.setAlpha(220); + fromColor.setAlpha(220); } - const QColor toColor = option->palette.brush(QPalette::ToolTipBase).color(); - const QColor fromColor = KColorScheme::shade(toColor, KColorScheme::LightShade, 0.2); QLinearGradient gradient(option->rect.topLeft(), option->rect.bottomLeft()); gradient.setColorAt(0.0, fromColor); -- cgit v1.3