Fix Search and KeeShare banner style

This commit is contained in:
Jonathan White 2020-08-01 11:13:28 -04:00
parent a79afd6580
commit 7f2efd3193
5 changed files with 31 additions and 8 deletions

View File

@ -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();
}
}
}

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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>