From 97edf59660794cd5de67e9881bc0fd71e3163baa Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 19 Oct 2021 16:50:57 +0200 Subject: [PATCH] High-level layout of Marketplace window Currently just a title and a page. The title is separate because in between there will be the tabs selecting which page is shown. The title will also change depending on that, but that'll have to be implemented separately. The page is loaded with a loader to make it efficient, and also to make it extensible when the tabs get implemented in a follow-up ticket. Contributes to issue CURA-8556. --- .../Marketplace/resources/qml/Marketplace.qml | 33 +++++++++++++++++++ plugins/Marketplace/resources/qml/Plugins.qml | 9 +++++ 2 files changed, 42 insertions(+) create mode 100644 plugins/Marketplace/resources/qml/Plugins.qml diff --git a/plugins/Marketplace/resources/qml/Marketplace.qml b/plugins/Marketplace/resources/qml/Marketplace.qml index 96b13d5522..b0b3d904e5 100644 --- a/plugins/Marketplace/resources/qml/Marketplace.qml +++ b/plugins/Marketplace/resources/qml/Marketplace.qml @@ -2,6 +2,8 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 import QtQuick.Window 2.2 import UM 1.2 as UM @@ -18,4 +20,35 @@ Window title: "Marketplace" //Seen by Ultimaker as a brand name, so this doesn't get translated. modality: Qt.NonModal + + Rectangle //Background color. + { + anchors.fill: parent + color: UM.Theme.getColor("main_background") + + ColumnLayout + { + anchors.fill: parent + anchors.margins: UM.Theme.getSize("default_margin").width + + spacing: UM.Theme.getSize("default_margin").height + + Label //Page title. + { + Layout.preferredWidth: parent.width + Layout.preferredHeight: contentHeight + + font: UM.Theme.getFont("large") + color: UM.Theme.getColor("text") + text: catalog.i18nc("@header", "Install Plugins") + } + Loader //Page contents. + { + Layout.preferredWidth: parent.width + Layout.fillHeight: true + + source: "Plugins.qml" + } + } + } } \ No newline at end of file diff --git a/plugins/Marketplace/resources/qml/Plugins.qml b/plugins/Marketplace/resources/qml/Plugins.qml new file mode 100644 index 0000000000..2d37483510 --- /dev/null +++ b/plugins/Marketplace/resources/qml/Plugins.qml @@ -0,0 +1,9 @@ +// Copyright (c) 2021 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.15 + +Rectangle +{ + color: "pink" //TODO +} \ No newline at end of file