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
path: root/src/gui
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2020-08-01 18:13:28 +0300
committerJonathan White <support@dmapps.us>2020-08-08 21:10:49 +0300
commit7f2efd3193802c083e8873b1ea9cbbacf0d3e7fd (patch)
tree275158fdab9ca4cafc94a3f2d0d9d812a45c3e46 /src/gui
parenta79afd6580421775e4eebc2d24b601001060054d (diff)
Fix Search and KeeShare banner style
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/Application.cpp5
-rw-r--r--src/gui/DatabaseWidget.cpp10
-rw-r--r--src/gui/styles/base/basestyle.qss8
-rw-r--r--src/gui/styles/base/classicstyle.qss15
-rw-r--r--src/gui/styles/styles.qrc1
5 files changed, 31 insertions, 8 deletions
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<Database> 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 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource prefix="/styles">
+ <file>base/classicstyle.qss</file>
<file>base/basestyle.qss</file>
<file>dark/darkstyle.qss</file>
<file>light/lightstyle.qss</file>