mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 13:07:38 +03:00
Multiple fixes to MainWindow and some cleanup
* Fix MainWindow startup when minimize to tray was enabled * Reduce duplicate code in DatabaseWidget.cpp * Fix snapcraft build dependencies * Add support for CTRL+TAB, CTRL+PGUP, CTRL+SHIFT+TAB, CTRL+PGDN to control database tabs from any focus location * Add CTRL+SHIFT+M shortcut to minimize to tray * Allow minimize instead of app exit without tray icon
This commit is contained in:
parent
c749f7018e
commit
a44138dd5c
8 changed files with 125 additions and 127 deletions
|
@ -71,20 +71,10 @@ void bootstrapApplication()
|
|||
void restoreMainWindowState(MainWindow& mainWindow)
|
||||
{
|
||||
// start minimized if configured
|
||||
bool minimizeOnStartup = config()->get("GUI/MinimizeOnStartup").toBool();
|
||||
bool minimizeToTray = config()->get("GUI/MinimizeToTray").toBool();
|
||||
#ifndef Q_OS_LINUX
|
||||
if (minimizeOnStartup) {
|
||||
#else
|
||||
// On some Linux systems, the window should NOT be minimized and hidden (i.e. not shown), at
|
||||
// the same time (which would happen if both minimize on startup and minimize to tray are set)
|
||||
// since otherwise it causes problems on restore as seen on issue #1595. Hiding it is enough.
|
||||
if (minimizeOnStartup && !minimizeToTray) {
|
||||
#endif
|
||||
mainWindow.setWindowState(Qt::WindowMinimized);
|
||||
}
|
||||
if (!(minimizeOnStartup && minimizeToTray)) {
|
||||
mainWindow.show();
|
||||
if (config()->get("GUI/MinimizeOnStartup").toBool()) {
|
||||
mainWindow.showMinimized();
|
||||
} else {
|
||||
mainWindow.bringToFront();
|
||||
}
|
||||
|
||||
if (config()->get("OpenPreviousDatabasesOnStartup").toBool()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue