mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
committed by
GitHub
parent
aed492b881
commit
e24aaa4ce1
@@ -119,9 +119,8 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::MainWindow(IGUIApplication *app, QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, GUIApplicationComponent(app)
|
||||
MainWindow::MainWindow(IGUIApplication *app, const State initialState)
|
||||
: GUIApplicationComponent(app)
|
||||
, m_ui(new Ui::MainWindow)
|
||||
, m_storeExecutionLogEnabled(EXECUTIONLOG_SETTINGS_KEY(u"Enabled"_qs))
|
||||
, m_storeDownloadTrackerFavicon(SETTINGS_KEY(u"DownloadTrackerFavicon"_qs))
|
||||
@@ -381,7 +380,7 @@ MainWindow::MainWindow(IGUIApplication *app, QWidget *parent)
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
// Make sure the Window is visible if we don't have a tray icon
|
||||
if (pref->startMinimized())
|
||||
if (initialState == Minimized)
|
||||
{
|
||||
showMinimized();
|
||||
}
|
||||
@@ -394,13 +393,13 @@ MainWindow::MainWindow(IGUIApplication *app, QWidget *parent)
|
||||
#else
|
||||
if (app->desktopIntegration()->isActive())
|
||||
{
|
||||
if (!(pref->startMinimized() || m_uiLocked))
|
||||
if ((initialState != Minimized) && !m_uiLocked)
|
||||
{
|
||||
show();
|
||||
activateWindow();
|
||||
raise();
|
||||
}
|
||||
else if (pref->startMinimized())
|
||||
else if (initialState == Minimized)
|
||||
{
|
||||
showMinimized();
|
||||
if (pref->minimizeToTray())
|
||||
@@ -417,7 +416,7 @@ MainWindow::MainWindow(IGUIApplication *app, QWidget *parent)
|
||||
else
|
||||
{
|
||||
// Make sure the Window is visible if we don't have a tray icon
|
||||
if (pref->startMinimized())
|
||||
if (initialState == Minimized)
|
||||
{
|
||||
showMinimized();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user