0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-20 12:22:16 +02:00

enable minimize on close for macOS

This commit is contained in:
thez3ro 2017-05-08 23:27:54 +02:00
parent 9f819061cd
commit b3160a17ea
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073

View File

@ -660,8 +660,12 @@ void MainWindow::databaseTabChanged(int tabIndex)
void MainWindow::closeEvent(QCloseEvent* event)
{
bool minimizeOnClose = isTrayIconEnabled() &&
config()->get("GUI/MinimizeOnClose").toBool();
bool minimizeOnClose = config()->get("GUI/MinimizeOnClose").toBool();
#ifndef Q_OS_MAC
// if we aren't on OS X, check if the tray is enabled.
// on OS X we are using the dock for the minimize action
minimizeOnClose = isTrayIconEnabled() && minimizeOnClose;
#endif
if (minimizeOnClose && !appExitCalled)
{
event->ignore();