From 23f8d58859d637da6fcb75050c8dde90fa37ae8e Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Wed, 27 Dec 2017 16:46:56 +0100 Subject: [PATCH] Add default value for DarkTrayIcon option and fix style issues --- src/core/Config.cpp | 1 + src/core/FilePath.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/Config.cpp b/src/core/Config.cpp index 2047919b1..96fd385ff 100644 --- a/src/core/Config.cpp +++ b/src/core/Config.cpp @@ -135,6 +135,7 @@ void Config::init(const QString& fileName) m_defaults.insert("security/IconDownloadFallbackToGoogle", false); m_defaults.insert("GUI/Language", "system"); m_defaults.insert("GUI/ShowTrayIcon", false); + m_defaults.insert("GUI/DarkTrayIcon", false); m_defaults.insert("GUI/MinimizeToTray", false); m_defaults.insert("GUI/MinimizeOnClose", false); } diff --git a/src/core/FilePath.cpp b/src/core/FilePath.cpp index f4703b99b..f694f548b 100644 --- a/src/core/FilePath.cpp +++ b/src/core/FilePath.cpp @@ -1,4 +1,5 @@ /* + * Copyright (C) 2017 KeePassXC Team * Copyright (C) 2011 Felix Geyer * * This program is free software: you can redistribute it and/or modify @@ -116,9 +117,9 @@ QIcon FilePath::trayIconUnlocked() bool darkIcon = useDarkIcon(); #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 - return (darkIcon) ? icon("apps", "keepassxc-dark") : icon("apps", "keepassxc-unlocked"); + return darkIcon ? icon("apps", "keepassxc-dark") : icon("apps", "keepassxc-unlocked"); #endif }