mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Minimize-On-Startup: add function to minimize mainwindow if all four tray settings are true
This commit is contained in:
parent
0f0af12353
commit
3cf1a16398
@ -307,6 +307,17 @@ void MainWindow::openDatabase(const QString& fileName, const QString& pw, const
|
||||
m_ui->tabWidget->openDatabase(fileName, pw, keyFile);
|
||||
}
|
||||
|
||||
void MainWindow::configuredMinimizeWindow()
|
||||
{
|
||||
bool minimize = isTrayIconEnabled() &&
|
||||
config()->get("GUI/MinimizeToTray").toBool() &&
|
||||
config()->get("GUI/MinimizeOnClose").toBool() &&
|
||||
config()->get("GUI/MinimizeOnStartup").toBool();
|
||||
if (minimize) {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
||||
{
|
||||
bool inDatabaseTabWidget = (m_ui->stackedWidget->currentIndex() == 0);
|
||||
|
@ -38,6 +38,7 @@ class MainWindow : public QMainWindow
|
||||
public:
|
||||
MainWindow();
|
||||
~MainWindow();
|
||||
void configuredMinimizeWindow();
|
||||
|
||||
public Q_SLOTS:
|
||||
void openDatabase(const QString& fileName, const QString& pw = QString(),
|
||||
|
Loading…
Reference in New Issue
Block a user