diff --git a/src/gui/Application.cpp b/src/gui/Application.cpp index 3e97639d6..0c389706f 100644 --- a/src/gui/Application.cpp +++ b/src/gui/Application.cpp @@ -169,6 +169,11 @@ void Application::applyTheme() #ifndef Q_OS_WIN m_darkTheme = osUtils->isDarkMode(); #endif + QFile stylesheetFile(":/styles/base/classicstyle.qss"); + if (stylesheetFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + setStyleSheet(stylesheetFile.readAll()); + stylesheetFile.close(); + } } } diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index b929cfaf0..8aca27940 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -141,21 +141,15 @@ DatabaseWidget::DatabaseWidget(QSharedPointer db, QWidget* parent) connect(m_entryView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(emitEntryContextMenuRequested(QPoint))); // Add a notification for when we are searching + m_searchingLabel->setObjectName("SearchBanner"); m_searchingLabel->setText(tr("Searching...")); m_searchingLabel->setAlignment(Qt::AlignCenter); - m_searchingLabel->setStyleSheet("color: rgb(0, 0, 0);" - "background-color: rgb(255, 253, 160);" - "border: 2px solid rgb(190, 190, 190);" - "border-radius: 4px;"); m_searchingLabel->setVisible(false); #ifdef WITH_XC_KEESHARE + m_shareLabel->setObjectName("KeeShareBanner"); m_shareLabel->setText(tr("Shared group...")); m_shareLabel->setAlignment(Qt::AlignCenter); - m_shareLabel->setStyleSheet("color: rgb(0, 0, 0);" - "background-color: rgb(255, 253, 160);" - "border: 2px solid rgb(190, 190, 190);" - "border-radius: 4px;"); m_shareLabel->setVisible(false); #endif diff --git a/src/gui/styles/base/basestyle.qss b/src/gui/styles/base/basestyle.qss index 9bfc6a605..5eea9f90c 100644 --- a/src/gui/styles/base/basestyle.qss +++ b/src/gui/styles/base/basestyle.qss @@ -56,3 +56,11 @@ QToolTip { border: none; padding: 3px; } + +DatabaseWidget #SearchBanner, DatabaseWidget #KeeShareBanner { + font-weight: bold; + background-color: palette(highlight); + color: palette(highlighted-text); + border: 1px solid palette(dark); + padding: 2px; +} diff --git a/src/gui/styles/base/classicstyle.qss b/src/gui/styles/base/classicstyle.qss new file mode 100644 index 000000000..653edd5bb --- /dev/null +++ b/src/gui/styles/base/classicstyle.qss @@ -0,0 +1,15 @@ +DatabaseOpenWidget #loginFrame { + border: 2px groove palette(mid); + background: palette(light); +} + +QToolTip { + padding: 3px; +} + +DatabaseWidget #SearchBanner, DatabaseWidget #KeeShareBanner { + font-weight: bold; + background-color: rgb(94, 161, 14); + border: 1px solid rgb(190, 190, 190); + padding: 2px; +} diff --git a/src/gui/styles/styles.qrc b/src/gui/styles/styles.qrc index c8e9057dc..9f4d7d74c 100644 --- a/src/gui/styles/styles.qrc +++ b/src/gui/styles/styles.qrc @@ -1,6 +1,7 @@ + base/classicstyle.qss base/basestyle.qss dark/darkstyle.qss light/lightstyle.qss