Merge pull request #10898 from cbjeukendrup/fix_10848

Fix #10848: Onboarding process no longer starts in the main 'Score' tab. Rewording of Tutorial description needed. App should start maximised.
This commit is contained in:
RomanPudashkin 2022-04-04 10:58:33 +02:00 committed by GitHub
commit 4e8b1e9fa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 23 deletions

View file

@ -29,7 +29,7 @@ import MuseScore.AppShell 1.0
Page {
title: qsTrc("appshell", "Video tutorials")
explanation: qsTrc("appshell", "This is the Learn section, where youll find tutorials to get you started\n(Video tutorials require an internet connection)")
explanation: qsTrc("appshell", "Behind this dialog is the Learn section, where youll find tutorials to get you started\n(Video tutorials require an internet connection)")
titleContentSpacing: 12

View file

@ -51,9 +51,5 @@ AppWindow {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
onWindowLoaded: {
root.visible = true
}
}
}

View file

@ -141,9 +141,5 @@ AppWindow {
id: window
anchors.fill: parent
onWindowLoaded: {
root.visible = true
}
}
}

View file

@ -83,9 +83,5 @@ AppWindow {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
onWindowLoaded: {
root.visible = true
}
}
}

View file

@ -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!";
}
}

View file

@ -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<DockPageView> m_pages;
async::Channel<QStringList> m_docksOpenStatusChanged;
bool m_hasGeometryBeenRestored = false;
bool m_quiting = false;
bool m_workspaceChanging = false;
};

View file

@ -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" }
};
}