X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a0ed7ae53d8ef463725fd07bd6acd381c979cd55..8ff20f651936ee19b20902b90b7d452450f4e2c3:/src/statusbarspaceinfo.cpp diff --git a/src/statusbarspaceinfo.cpp b/src/statusbarspaceinfo.cpp index eb546831b..844368136 100644 --- a/src/statusbarspaceinfo.cpp +++ b/src/statusbarspaceinfo.cpp @@ -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)); @@ -93,18 +93,18 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */) } painter.drawRect(QRect(left, barTop + 2, right, barHeight - 1)); - text = i18n("%1 free", KIO::convertSizeFromKiB(m_kBAvailable)); + text = i18nc("@info:status", "%1 free", KIO::convertSizeFromKiB(m_kBAvailable)); } else { if (m_gettingSize) { - text = i18n("Getting size..."); + 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