Commit c770b6e5 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Restrict the background color to the push button

Without specifying "QPushButton", Qt also applied the background color
to the tooltip which made it very hard to read because the tooltip uses
white text and the positive/negative background color is a light
green/red.

GnuPG-bug-id: 5362
parent 2238fed4
Pipeline #91562 passed with stage
in 14 minutes and 47 seconds
......@@ -275,7 +275,7 @@ private:
btn->setIcon(QIcon::fromTheme(de_vs
? QStringLiteral("security-high")
: QStringLiteral("security-medium")));
btn->setStyleSheet(QStringLiteral("background-color: ") + (de_vs
btn->setStyleSheet(QStringLiteral("QPushButton { background-color: %1; }").arg(de_vs
? KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::PositiveBackground).color().name()
: KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::NegativeBackground).color().name()));
ui.complianceLB.setText(de_vs
......
......@@ -382,7 +382,7 @@ private Q_SLOTS:
btn->setIcon(QIcon::fromTheme(de_vs
? QStringLiteral("security-high")
: QStringLiteral("security-medium")));
btn->setStyleSheet(QStringLiteral("background-color: ") + (de_vs
btn->setStyleSheet(QStringLiteral("QPushButton { background-color: %1; }").arg(de_vs
? KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::PositiveBackground).color().name()
: KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::NegativeBackground).color().name()));
mParent->setLabelText(de_vs
......
......@@ -491,7 +491,7 @@ public:
mCryptBtn->setIcon(QIcon::fromTheme(de_vs
? QStringLiteral("security-high")
: QStringLiteral("security-medium")));
mCryptBtn->setStyleSheet(QStringLiteral("background-color: ") + (de_vs
mCryptBtn->setStyleSheet(QStringLiteral("QPushButton { background-color: %1; }").arg(de_vs
? KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::PositiveBackground).color().name()
: KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::NegativeBackground).color().name()));
mAdditionalInfoLabel->setText(de_vs
......
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