Commit de3d4cf9 authored by Volker Krause's avatar Volker Krause
Browse files

Port away from KStatefulBrush::brush(const QWidget*)

Soon to be deprecated, use the QPalette overload instead.
parent d53fb428
Pipeline #67370 passed with stage
in 39 minutes and 41 seconds
......@@ -197,7 +197,7 @@ void SearchLineStatus::updateFilterActionIcon()
if (mColorName.isEmpty()) {
const KColorScheme::BackgroundRole bgColorScheme(KColorScheme::PositiveBackground);
KStatefulBrush bgBrush(KColorScheme::View, bgColorScheme);
mColorName = bgBrush.brush(this).color().name();
mColorName = bgBrush.brush(palette()).color().name();
}
setStyleSheet(mHasFilter ? QStringLiteral("QLineEdit{ background-color:%1 }").arg(mColorName) : QString());
}
......
......@@ -153,9 +153,9 @@ void FindBarBase::setFoundMatch(bool match)
if (!mSearch->text().isEmpty()) {
if (mNegativeBackground.isEmpty()) {
KStatefulBrush bgBrush(KColorScheme::View, KColorScheme::PositiveBackground);
mPositiveBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch).color().name());
mPositiveBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch->palette()).color().name());
bgBrush = KStatefulBrush(KColorScheme::View, KColorScheme::NegativeBackground);
mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch).color().name());
mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch->palette()).color().name());
}
if (match) {
styleSheet = mPositiveBackground;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment