From 293ef357fc05ac3485d646c5a82d65d5809d9aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfram=20R=C3=B6sler?= Date: Mon, 10 Jun 2019 03:22:19 +0200 Subject: [PATCH] Add system tray icon for "Toggle Window" (#3244) * Fixes #3145 The system tray menu used to have three items (toggle window, lock database, quit) of which only two had an icon, which looked strange and unintended. This commit adds an icon for the "Toggle window" menu item. * Use a padlock icon for the "Lock DB" tray menu item Originally, icon `document-encryt.png` was used, however theming seems to be getting in the way by sometimes displaying a plain "document" icon instead. Copied the icon files to `database-lock.png` and used that one for the "lock database" tray menu item instead. * In Database Settings, use the "security-high" icon for "Security" Previously, the "document-encrypt" icon was used, which should be something like a padlock but which, due to theming, somethings fell back to a generic document icon (page of paper). The "document-encrypt" icon is no longer used and was removed. --- COPYING | 2 +- .../{document-encrypt.png => database-lock.png} | Bin .../{document-encrypt.png => database-lock.png} | Bin .../{document-encrypt.png => database-lock.png} | Bin src/gui/MainWindow.cpp | 3 ++- src/gui/dbsettings/DatabaseSettingsDialog.cpp | 2 +- 6 files changed, 4 insertions(+), 3 deletions(-) rename share/icons/application/16x16/actions/{document-encrypt.png => database-lock.png} (100%) rename share/icons/application/22x22/actions/{document-encrypt.png => database-lock.png} (100%) rename share/icons/application/32x32/actions/{document-encrypt.png => database-lock.png} (100%) diff --git a/COPYING b/COPYING index ed2f73a4f..a75f6c69d 100644 --- a/COPYING +++ b/COPYING @@ -160,11 +160,11 @@ Comment: based on Nuvola icon theme Files: share/icons/application/*/actions/application-exit.png share/icons/application/*/actions/chronometer.png share/icons/application/*/actions/configure.png + share/icons/application/*/actions/database-lock.png share/icons/application/*/actions/dialog-close.png share/icons/application/*/actions/dialog-ok.png share/icons/application/*/actions/document-close.png share/icons/application/*/actions/document-edit.png - share/icons/application/*/actions/document-encrypt.png share/icons/application/*/actions/document-new.png share/icons/application/*/actions/document-open.png share/icons/application/*/actions/document-properties.png diff --git a/share/icons/application/16x16/actions/document-encrypt.png b/share/icons/application/16x16/actions/database-lock.png similarity index 100% rename from share/icons/application/16x16/actions/document-encrypt.png rename to share/icons/application/16x16/actions/database-lock.png diff --git a/share/icons/application/22x22/actions/document-encrypt.png b/share/icons/application/22x22/actions/database-lock.png similarity index 100% rename from share/icons/application/22x22/actions/document-encrypt.png rename to share/icons/application/22x22/actions/database-lock.png diff --git a/share/icons/application/32x32/actions/document-encrypt.png b/share/icons/application/32x32/actions/database-lock.png similarity index 100% rename from share/icons/application/32x32/actions/document-encrypt.png rename to share/icons/application/32x32/actions/database-lock.png diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 85fc1ab1d..525fa153a 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -290,7 +290,7 @@ MainWindow::MainWindow() m_ui->actionDatabaseClose->setIcon(filePath()->icon("actions", "document-close")); m_ui->actionChangeDatabaseSettings->setIcon(filePath()->icon("actions", "document-edit")); m_ui->actionChangeMasterKey->setIcon(filePath()->icon("actions", "database-change-key")); - m_ui->actionLockDatabases->setIcon(filePath()->icon("actions", "document-encrypt")); + m_ui->actionLockDatabases->setIcon(filePath()->icon("actions", "database-lock")); m_ui->actionQuit->setIcon(filePath()->icon("actions", "application-exit")); m_ui->actionEntryNew->setIcon(filePath()->icon("actions", "entry-new")); @@ -977,6 +977,7 @@ void MainWindow::updateTrayIcon() QAction* actionToggle = new QAction(tr("Toggle window"), menu); menu->addAction(actionToggle); + actionToggle->setIcon(filePath()->icon("apps", "keepassxc")); menu->addAction(m_ui->actionLockDatabases); diff --git a/src/gui/dbsettings/DatabaseSettingsDialog.cpp b/src/gui/dbsettings/DatabaseSettingsDialog.cpp index d0520f772..e0c59f108 100644 --- a/src/gui/dbsettings/DatabaseSettingsDialog.cpp +++ b/src/gui/dbsettings/DatabaseSettingsDialog.cpp @@ -77,7 +77,7 @@ DatabaseSettingsDialog::DatabaseSettingsDialog(QWidget* parent) connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject())); m_ui->categoryList->addCategory(tr("General"), FilePath::instance()->icon("categories", "preferences-other")); - m_ui->categoryList->addCategory(tr("Security"), FilePath::instance()->icon("actions", "document-encrypt")); + m_ui->categoryList->addCategory(tr("Security"), FilePath::instance()->icon("actions", "security-high")); m_ui->stackedWidget->addWidget(m_generalWidget); m_ui->stackedWidget->addWidget(m_securityTabWidget);