Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/styles/light/LightStyle.cpp')
-rw-r--r--src/gui/styles/light/LightStyle.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/styles/light/LightStyle.cpp b/src/gui/styles/light/LightStyle.cpp
index 8dd9d6c53..f1f0cb997 100644
--- a/src/gui/styles/light/LightStyle.cpp
+++ b/src/gui/styles/light/LightStyle.cpp
@@ -24,6 +24,14 @@
#include <QMenuBar>
#include <QToolBar>
+LightStyle::LightStyle()
+ : BaseStyle()
+{
+#ifdef Q_OS_MACOS
+ m_drawNativeMacOsToolBar = !osUtils->isDarkMode();
+#endif
+}
+
QPalette LightStyle::standardPalette() const
{
auto palette = BaseStyle::standardPalette();
@@ -106,13 +114,10 @@ void LightStyle::polish(QWidget* widget)
|| qobject_cast<QToolBar*>(widget)) {
auto palette = widget->palette();
#if defined(Q_OS_MACOS)
- if (!osUtils->isDarkMode()) {
- // Let the Cocoa platform plugin draw its own background
- palette.setColor(QPalette::All, QPalette::Window, Qt::transparent);
- } else {
- palette.setColor(QPalette::Active, QPalette::Window, QRgb(0xD6D6D6));
- palette.setColor(QPalette::Inactive, QPalette::Window, QRgb(0xF6F6F6));
- palette.setColor(QPalette::Disabled, QPalette::Window, QRgb(0xD4D4D4));
+ if (osUtils->isDarkMode()) {
+ palette.setColor(QPalette::Active, QPalette::Window, QRgb(0xD1D1D1));
+ palette.setColor(QPalette::Inactive, QPalette::Window, QRgb(0xF4F4F4));
+ palette.setColor(QPalette::Disabled, QPalette::Window, QRgb(0xD1D1D1));
}
#elif defined(Q_OS_WIN)
palette.setColor(QPalette::All, QPalette::Window, QRgb(0xFFFFFF));