Commit b6487ce0 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 c6212fc9
Pipeline #67382 passed with stage
in 53 minutes and 46 seconds
......@@ -60,7 +60,7 @@ void GrammarResultTextEdit::generalPaletteChanged()
color.setAlpha(128);
mTextColor = color;
const KStatefulBrush bgBrush = KStatefulBrush(KColorScheme::View, KColorScheme::NegativeText);
mNegativeTextColor = bgBrush.brush(this).color();
mNegativeTextColor = bgBrush.brush(palette).color();
}
void GrammarResultTextEdit::applyGrammarResult(const QVector<GrammarError> &infos)
......
......@@ -135,7 +135,7 @@ void EmailLineEdit::verifyAddress()
mEmailIsValid = lineEditText.contains(QLatin1Char('@'));
if (mNegativeBackground.isEmpty()) {
KStatefulBrush bgBrush = KStatefulBrush(KColorScheme::View, KColorScheme::NegativeText);
mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(this).color().name());
mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(palette()).color().name());
}
if (!mEmailIsValid) {
styleSheet = mNegativeBackground;
......
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