Complete interface for selecting cloud printer.

CURA-9278
This commit is contained in:
Remco Burema 2022-09-09 11:05:05 +02:00
parent d955a05d55
commit 6adf05bbf0
4 changed files with 83 additions and 32 deletions

View file

@ -10,19 +10,65 @@ import Cura 1.0 as Cura
UM.Dialog
{
property var manager
id: base
title: catalog.i18nc("@title:window", "Select Printer")
backgroundColor: UM.Theme.getColor("background_2")
property string machine_id_filter: ""
width: minimumWidth
minimumWidth: 550 * screenScaleFactor
height: minimumHeight
minimumHeight: 550 * screenScaleFactor
modality: Qt.ApplicationModal
ScrollView
{
// Workaround for Windowing bugs in Qt:
width: 550 * screenScaleFactor - 3 * UM.Theme.getSize("default_margin").width
height: 550 * screenScaleFactor - 3 * UM.Theme.getSize("default_margin").height
UM.I18nCatalog
{
id: catalog
name: "cura"
}
anchors.fill: parent
Column
{
anchors.fill: parent
spacing: UM.Theme.getSize("default_margin").height
Item
{
width: parent.width
height: childrenRect.height
UM.Label
{
anchors.left: parent.left
text: catalog.i18nc("@title:label", "Compatible Printers")
font: UM.Theme.getFont("large")
}
UM.SimpleButton
{
anchors.right: parent.right
width: UM.Theme.getSize("small_button").width
height: UM.Theme.getSize("small_button").height
iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight")
color: UM.Theme.getColor("text_link")
hoverColor: UM.Theme.getColor("text_scene_hover")
onClicked: manager.refresh()
}
}
Repeater
{
id: contents
@ -32,9 +78,17 @@ UM.Dialog
delegate: Cura.PrintSelectorCard
{
name: model.name
unique_id: model.unique_id
extruders: model.extruders
manager: base.manager
}
}
UM.Label
{
visible: contents.count < 1
text: catalog.i18nc("@description", "No compatible printers, that are currently online, where found.")
}
}
}
}