diff --git a/sidebar/SidebarMode.h b/sidebar/SidebarMode.h --- a/sidebar/SidebarMode.h +++ b/sidebar/SidebarMode.h @@ -84,6 +84,7 @@ Q_INVOKABLE void hideSubCategoryToolTip(); Q_INVOKABLE void loadMostUsed(int index); Q_INVOKABLE void showActionMenu(const QPoint &position); + Q_INVOKABLE void showIntroPage(); protected: QList views() const override; diff --git a/sidebar/SidebarMode.cpp b/sidebar/SidebarMode.cpp --- a/sidebar/SidebarMode.cpp +++ b/sidebar/SidebarMode.cpp @@ -421,6 +421,12 @@ d->setActionMenuVisible(this, true); } +void SidebarMode::showIntroPage() +{ + d->placeHolderWidget->show(); + d->moduleView->hide(); +} + void SidebarMode::changeModule( const QModelIndex& activeModule ) { d->moduleView->closeModules(); diff --git a/sidebar/package/contents/ui/CategoriesPage.qml b/sidebar/package/contents/ui/CategoriesPage.qml --- a/sidebar/package/contents/ui/CategoriesPage.qml +++ b/sidebar/package/contents/ui/CategoriesPage.qml @@ -41,19 +41,17 @@ } QQC2.ToolButton { - id: menuButton - icon.name: "application-menu" - checkable: true - checked: systemsettings.actionMenuVisible + id: showIntroPageButton + icon.name: "go-home" Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 Layout.maximumHeight: width Keys.onBacktabPressed: { root.focusPreviousRequest() } - onClicked: systemsettings.showActionMenu(mapToGlobal(0, height)) + onClicked: systemsettings.showIntroPage(); QQC2.ToolTip { - text: i18n("Show menu") + text: i18n("Show intro page") } } @@ -67,6 +65,23 @@ systemsettings.categoryModel.filterRegExp = text; } } + + QQC2.ToolButton { + id: menuButton + icon.name: "application-menu" + checkable: true + checked: systemsettings.actionMenuVisible + Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 + Layout.maximumHeight: width + Keys.onBacktabPressed: { + root.focusPreviousRequest() + } + onClicked: systemsettings.showActionMenu(mapToGlobal(0, height)) + + QQC2.ToolTip { + text: i18n("Show menu") + } + } } Kirigami.Separator { anchors {