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.
This commit is contained in:
Ghostkeeper 2021-10-19 16:50:57 +02:00
parent 8beac74417
commit 97edf59660
No known key found for this signature in database
GPG key ID: 68F39EA88EEED5FF
2 changed files with 42 additions and 0 deletions

View file

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

View file

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