mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 09:45:56 +08:00
Add a StackView around Marketplace to allow extra pages on top
This allows a sort of full-screen pop-up to replace the entire Marketplace window contents, on top of the normal contents. The normal contents are kept as they are, but out of view. Contributes to issue CURA-8565.
This commit is contained in:
parent
34911380d2
commit
26a39f0240
@ -42,8 +42,17 @@ Window
|
||||
anchors.fill: parent
|
||||
color: UM.Theme.getColor("main_background")
|
||||
|
||||
//The Marketplace can have a page in front of everything with package details. The stack view controls its visibility.
|
||||
StackView
|
||||
{
|
||||
id: contextStack
|
||||
anchors.fill: parent
|
||||
|
||||
initialItem: packageBrowse
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
id: packageBrowse
|
||||
anchors.fill: parent
|
||||
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
@ -185,4 +194,5 @@ Window
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
plugins/Marketplace/resources/qml/PackageDetails.qml
Normal file
10
plugins/Marketplace/resources/qml/PackageDetails.qml
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright (c) 2021 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
Label
|
||||
{
|
||||
text: "Test!"
|
||||
}
|
@ -62,10 +62,21 @@ ListView
|
||||
}
|
||||
}
|
||||
|
||||
delegate: PackageCard
|
||||
delegate: MouseArea
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
onClicked:
|
||||
{
|
||||
contextStack.push(Qt.resolvedUrl("PackageDetails.qml"))
|
||||
}
|
||||
|
||||
PackageCard
|
||||
{
|
||||
packageData: model.package
|
||||
}
|
||||
}
|
||||
|
||||
//Wrapper item to add spacing between content and footer.
|
||||
footer: Item
|
||||
|
Loading…
x
Reference in New Issue
Block a user