mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-29 09:16:29 -05:00
Fix dark tray icon option making all icons dark
Introduces a separate path for tray icons which are neither locked nor unlocked. Closes #1556.
This commit is contained in:
parent
2fcaeeaec8
commit
082ecc3f37
@ -97,6 +97,15 @@ QString FilePath::wordlistPath(const QString& name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::applicationIcon()
|
QIcon FilePath::applicationIcon()
|
||||||
|
{
|
||||||
|
#ifdef KEEPASSXC_DIST_SNAP
|
||||||
|
return icon("apps", "keepassxc", false);
|
||||||
|
#else
|
||||||
|
return icon("apps", "keepassxc");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
QIcon FilePath::trayIcon()
|
||||||
{
|
{
|
||||||
bool darkIcon = useDarkIcon();
|
bool darkIcon = useDarkIcon();
|
||||||
|
|
||||||
@ -107,7 +116,6 @@ QIcon FilePath::applicationIcon()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QIcon FilePath::trayIconLocked()
|
QIcon FilePath::trayIconLocked()
|
||||||
{
|
{
|
||||||
#ifdef KEEPASSXC_DIST_SNAP
|
#ifdef KEEPASSXC_DIST_SNAP
|
||||||
|
@ -29,6 +29,7 @@ public:
|
|||||||
QString pluginPath(const QString& name);
|
QString pluginPath(const QString& name);
|
||||||
QString wordlistPath(const QString& name);
|
QString wordlistPath(const QString& name);
|
||||||
QIcon applicationIcon();
|
QIcon applicationIcon();
|
||||||
|
QIcon trayIcon();
|
||||||
QIcon trayIconLocked();
|
QIcon trayIconLocked();
|
||||||
QIcon trayIconUnlocked();
|
QIcon trayIconUnlocked();
|
||||||
QIcon icon(const QString& category, const QString& name, bool fromTheme = true);
|
QIcon icon(const QString& category, const QString& name, bool fromTheme = true);
|
||||||
|
@ -899,7 +899,7 @@ void MainWindow::updateTrayIcon()
|
|||||||
|
|
||||||
m_trayIcon->setContextMenu(menu);
|
m_trayIcon->setContextMenu(menu);
|
||||||
|
|
||||||
m_trayIcon->setIcon(filePath()->applicationIcon());
|
m_trayIcon->setIcon(filePath()->trayIcon());
|
||||||
m_trayIcon->show();
|
m_trayIcon->show();
|
||||||
}
|
}
|
||||||
if (m_ui->tabWidget->hasLockableDatabases()) {
|
if (m_ui->tabWidget->hasLockableDatabases()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user