From 8d06f40d82b71e63dea764e0d5c4d4b3a1ec509e Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 6 Jun 2007 16:59:21 +0000 Subject: assure that all statusbar elements use a transparent background to look nice with Oxygens gradiented background svn path=/trunk/KDE/kdebase/apps/; revision=672293 --- src/statusbarspaceinfo.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/statusbarspaceinfo.cpp') diff --git a/src/statusbarspaceinfo.cpp b/src/statusbarspaceinfo.cpp index 999f0ad54..bb0ed712a 100644 --- a/src/statusbarspaceinfo.cpp +++ b/src/statusbarspaceinfo.cpp @@ -38,6 +38,10 @@ StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) : { setMinimumWidth(200); + QPalette palette; + palette.setColor(QPalette::Background, Qt::transparent); + setPalette(palette); + // Update the space information each 10 seconds. Polling is useful // here, as files can be deleted/added outside the scope of Dolphin. QTimer* timer = new QTimer(this); @@ -67,11 +71,8 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */) const int widthDec = 3; // visual decrement for the available width - const QColor c1 = palette().brush(QPalette::Background).color(); - const QColor c2 = KGlobalSettings::buttonTextColor(); - const QColor frameColor((c1.red() + c2.red()) / 2, - (c1.green() + c2.green()) / 2, - (c1.blue() + c2.blue()) / 2); + QColor frameColor = palette().brush(QPalette::Background).color(); + frameColor.setAlpha(128); painter.setPen(frameColor); const QColor backgrColor = KGlobalSettings::baseColor(); -- cgit v1.3