Add default value for DarkTrayIcon option and fix style issues

This commit is contained in:
Janek Bevendorff 2017-12-27 16:46:56 +01:00
parent 4fa00b74ad
commit 23f8d58859
2 changed files with 4 additions and 2 deletions

View File

@ -135,6 +135,7 @@ void Config::init(const QString& fileName)
m_defaults.insert("security/IconDownloadFallbackToGoogle", false); m_defaults.insert("security/IconDownloadFallbackToGoogle", false);
m_defaults.insert("GUI/Language", "system"); m_defaults.insert("GUI/Language", "system");
m_defaults.insert("GUI/ShowTrayIcon", false); m_defaults.insert("GUI/ShowTrayIcon", false);
m_defaults.insert("GUI/DarkTrayIcon", false);
m_defaults.insert("GUI/MinimizeToTray", false); m_defaults.insert("GUI/MinimizeToTray", false);
m_defaults.insert("GUI/MinimizeOnClose", false); m_defaults.insert("GUI/MinimizeOnClose", false);
} }

View File

@ -1,4 +1,5 @@
/* /*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* Copyright (C) 2011 Felix Geyer <debfx@fobos.de> * Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -116,9 +117,9 @@ QIcon FilePath::trayIconUnlocked()
bool darkIcon = useDarkIcon(); bool darkIcon = useDarkIcon();
#ifdef KEEPASSXC_DIST_SNAP #ifdef KEEPASSXC_DIST_SNAP
return (darkIcon) ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false); return darkIcon ? icon("apps", "keepassxc-dark", false) : icon("apps", "keepassxc-unlocked", false);
#else #else
return (darkIcon) ? icon("apps", "keepassxc-dark") : icon("apps", "keepassxc-unlocked"); return darkIcon ? icon("apps", "keepassxc-dark") : icon("apps", "keepassxc-unlocked");
#endif #endif
} }