From 03e1fc34b4ff59d5fffe281b090fae5196d2e5cf Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 29 Oct 2021 15:51:41 +0200 Subject: [PATCH] Change page title depending on selected tab Contributes to issue CURA-8557. --- plugins/Marketplace/resources/qml/Marketplace.qml | 4 +++- plugins/Marketplace/resources/qml/PackageTypeTab.qml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Marketplace/resources/qml/Marketplace.qml b/plugins/Marketplace/resources/qml/Marketplace.qml index 33cae9e778..6cc4a3622d 100644 --- a/plugins/Marketplace/resources/qml/Marketplace.qml +++ b/plugins/Marketplace/resources/qml/Marketplace.qml @@ -63,7 +63,7 @@ Window font: UM.Theme.getFont("large") color: UM.Theme.getColor("text") - text: catalog.i18nc("@header", "Install Plugins") + text: pageSelectionTabBar.currentItem.pageTitle } } @@ -84,12 +84,14 @@ Window { width: implicitWidth text: catalog.i18nc("@button", "Plug-ins") + pageTitle: catalog.i18nc("@header", "Install Plugins") onClicked: content.source = "Plugins.qml" } PackageTypeTab { width: implicitWidth text: catalog.i18nc("@button", "Materials") + pageTitle: catalog.i18nc("@header", "Install Materials") onClicked: content.source = "Materials.qml" } } diff --git a/plugins/Marketplace/resources/qml/PackageTypeTab.qml b/plugins/Marketplace/resources/qml/PackageTypeTab.qml index 9b6136f1f0..31fbabc294 100644 --- a/plugins/Marketplace/resources/qml/PackageTypeTab.qml +++ b/plugins/Marketplace/resources/qml/PackageTypeTab.qml @@ -7,6 +7,8 @@ import UM 1.0 as UM TabButton { + property string pageTitle + background: Rectangle { anchors.fill: parent