Skip to content

Commit

Permalink
Add system tray icon for "Toggle Window" (keepassxreboot#3244)
Browse files Browse the repository at this point in the history
* Fixes keepassxreboot#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.
  • Loading branch information
wolframroesler authored and droidmonkey committed Jun 10, 2019
1 parent b13454e commit 293ef35
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/dbsettings/DatabaseSettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 293ef35

Please sign in to comment.