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 #ifndef Q_OS_WIN
m_darkTheme = osUtils->isDarkMode(); m_darkTheme = osUtils->isDarkMode();
#endif #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))); connect(m_entryView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(emitEntryContextMenuRequested(QPoint)));
// Add a notification for when we are searching // Add a notification for when we are searching
m_searchingLabel->setObjectName("SearchBanner");
m_searchingLabel->setText(tr("Searching...")); m_searchingLabel->setText(tr("Searching..."));
m_searchingLabel->setAlignment(Qt::AlignCenter); 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); m_searchingLabel->setVisible(false);
#ifdef WITH_XC_KEESHARE #ifdef WITH_XC_KEESHARE
m_shareLabel->setObjectName("KeeShareBanner");
m_shareLabel->setText(tr("Shared group...")); m_shareLabel->setText(tr("Shared group..."));
m_shareLabel->setAlignment(Qt::AlignCenter); 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); m_shareLabel->setVisible(false);
#endif #endif

View File

@ -56,3 +56,11 @@ QToolTip {
border: none; border: none;
padding: 3px; 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> <!DOCTYPE RCC>
<RCC version="1.0"> <RCC version="1.0">
<qresource prefix="/styles"> <qresource prefix="/styles">
<file>base/classicstyle.qss</file>
<file>base/basestyle.qss</file> <file>base/basestyle.qss</file>
<file>dark/darkstyle.qss</file> <file>dark/darkstyle.qss</file>
<file>light/lightstyle.qss</file> <file>light/lightstyle.qss</file>