mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-07 06:27:39 +03:00
enable minimize on close for macOS
This commit is contained in:
parent
9f819061cd
commit
b3160a17ea
1 changed files with 6 additions and 2 deletions
|
@ -660,8 +660,12 @@ void MainWindow::databaseTabChanged(int tabIndex)
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent* event)
|
void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
{
|
{
|
||||||
bool minimizeOnClose = isTrayIconEnabled() &&
|
bool minimizeOnClose = config()->get("GUI/MinimizeOnClose").toBool();
|
||||||
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)
|
if (minimizeOnClose && !appExitCalled)
|
||||||
{
|
{
|
||||||
event->ignore();
|
event->ignore();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue