]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbarspaceinfo.cpp
Fix the reproducible problem after the fix:
[dolphin.git] / src / statusbarspaceinfo.cpp
index ef65149bd2401f3626175ca4ce575d31595a100d..84436813608728d4af814adc631e949c338aab02 100644 (file)
@@ -75,7 +75,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
     frameColor.setAlpha(128);
     painter.setPen(frameColor);
 
-    const QColor backgrColor = KColorScheme(KColorScheme::View).background();
+    const QColor backgrColor = KColorScheme(QPalette::Active, KColorScheme::View).background().color();
     painter.setBrush(backgrColor);
 
     painter.drawRect(QRect(0, barTop + 1 , barWidth - widthDec, barHeight));
@@ -99,12 +99,12 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
             text = i18nc("@info:status", "Getting size...");
         } else {
             text = QString();
-            QTimer::singleShot(0, this, SLOT(hide()));
+            QMetaObject::invokeMethod(this, "hide", Qt::QueuedConnection);
         }
     }
 
     // draw text
-    painter.setPen(KColorScheme(KColorScheme::View).foreground());
+    painter.setPen(KColorScheme(QPalette::Active, KColorScheme::View).foreground().color());
     painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 6),
                      Qt::AlignCenter | Qt::TextWordWrap,
                      text);
@@ -164,7 +164,7 @@ void StatusBarSpaceInfo::refresh()
 
 QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const
 {
-    QColor color = KColorScheme(KColorScheme::Button).background();
+    QColor color = KColorScheme(QPalette::Active, KColorScheme::Button).background().color();
 
     // assure that enough contrast is given between the background color
     // and the progressbar color