diff --git a/src/appshell/qml/FirstLaunchSetup/TutorialsPage.qml b/src/appshell/qml/FirstLaunchSetup/TutorialsPage.qml index e26bb30e62..8feefe3893 100644 --- a/src/appshell/qml/FirstLaunchSetup/TutorialsPage.qml +++ b/src/appshell/qml/FirstLaunchSetup/TutorialsPage.qml @@ -29,7 +29,7 @@ import MuseScore.AppShell 1.0 Page { title: qsTrc("appshell", "Video tutorials") - explanation: qsTrc("appshell", "This is the ‘Learn’ section, where you’ll find tutorials to get you started\n(Video tutorials require an internet connection)") + explanation: qsTrc("appshell", "Behind this dialog is the ‘Learn’ section, where you’ll find tutorials to get you started\n(Video tutorials require an internet connection)") titleContentSpacing: 12 diff --git a/src/appshell/qml/platform/linux/Main.qml b/src/appshell/qml/platform/linux/Main.qml index f9f11aba31..8106b0ef15 100644 --- a/src/appshell/qml/platform/linux/Main.qml +++ b/src/appshell/qml/platform/linux/Main.qml @@ -51,9 +51,5 @@ AppWindow { anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom - - onWindowLoaded: { - root.visible = true - } } } diff --git a/src/appshell/qml/platform/mac/Main.qml b/src/appshell/qml/platform/mac/Main.qml index 2915b65c23..34df9b5391 100644 --- a/src/appshell/qml/platform/mac/Main.qml +++ b/src/appshell/qml/platform/mac/Main.qml @@ -141,9 +141,5 @@ AppWindow { id: window anchors.fill: parent - - onWindowLoaded: { - root.visible = true - } } } diff --git a/src/appshell/qml/platform/win/Main.qml b/src/appshell/qml/platform/win/Main.qml index 5923d1ec11..a86931cf21 100644 --- a/src/appshell/qml/platform/win/Main.qml +++ b/src/appshell/qml/platform/win/Main.qml @@ -83,9 +83,5 @@ AppWindow { anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom - - onWindowLoaded: { - root.visible = true - } } } diff --git a/src/appshell/view/dockwindow/dockwindow.cpp b/src/appshell/view/dockwindow/dockwindow.cpp index 66f0ba6673..281b1f16a1 100644 --- a/src/appshell/view/dockwindow/dockwindow.cpp +++ b/src/appshell/view/dockwindow/dockwindow.cpp @@ -213,15 +213,17 @@ void DockWindow::loadPage(const QString& uri, const QVariantMap& params) return; } - //! NOTE: show window as maximized if the user closed app in FullScreen mode - if (isFirstOpening && (m_mainWindow->windowHandle()->windowStates() & QWindow::FullScreen)) { - m_mainWindow->showMaximized(); - } - emit currentPageUriChanged(uri); if (isFirstOpening) { - emit windowLoaded(); + if (!m_hasGeometryBeenRestored + || (m_mainWindow->windowHandle()->windowStates() & QWindow::FullScreen)) { + //! NOTE: show window as maximized if no geometry has been restored + //! or if the user had closed app in FullScreen mode + m_mainWindow->windowHandle()->showMaximized(); + } else { + m_mainWindow->windowHandle()->setVisible(true); + } } emit pageLoaded(); @@ -509,7 +511,13 @@ void DockWindow::restoreGeometry() { TRACEFUNC; - if (!restoreLayout(uiConfiguration()->windowGeometry())) { + if (uiConfiguration()->windowGeometry().isEmpty()) { + return; + } + + if (restoreLayout(uiConfiguration()->windowGeometry())) { + m_hasGeometryBeenRestored = true; + } else { LOGE() << "Could not restore the window geometry!"; } } diff --git a/src/appshell/view/dockwindow/dockwindow.h b/src/appshell/view/dockwindow/dockwindow.h index 40add43be1..557b986476 100644 --- a/src/appshell/view/dockwindow/dockwindow.h +++ b/src/appshell/view/dockwindow/dockwindow.h @@ -90,7 +90,6 @@ public: void restoreDefaultLayout() override; signals: - void windowLoaded(); void pageLoaded(); void currentPageUriChanged(const QString& uri); @@ -137,6 +136,7 @@ private: uicomponents::QmlListProperty m_pages; async::Channel m_docksOpenStatusChanged; + bool m_hasGeometryBeenRestored = false; bool m_quiting = false; bool m_workspaceChanging = false; }; diff --git a/src/appshell/view/firstlaunchsetup/firstlaunchsetupmodel.cpp b/src/appshell/view/firstlaunchsetup/firstlaunchsetupmodel.cpp index 3974d600e3..348dc685db 100644 --- a/src/appshell/view/firstlaunchsetup/firstlaunchsetupmodel.cpp +++ b/src/appshell/view/firstlaunchsetup/firstlaunchsetupmodel.cpp @@ -31,8 +31,8 @@ FirstLaunchSetupModel::FirstLaunchSetupModel(QObject* parent) : QObject(parent) { m_pages = { - Page { "ThemesPage.qml", "musescore://home" }, - Page { "PlaybackPage.qml", "musescore://home" }, + Page { "ThemesPage.qml", "musescore://notation" }, + Page { "PlaybackPage.qml", "musescore://notation" }, Page { "TutorialsPage.qml", "musescore://home?section=learn" } }; }