mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Add extra card to refresh printer list
Contributes to issue CURA-8609.
This commit is contained in:
parent
7a47ffb1b7
commit
554f580f13
2 changed files with 68 additions and 0 deletions
|
@ -199,6 +199,7 @@ Window
|
|||
|
||||
ListView
|
||||
{
|
||||
id: printerList
|
||||
width: parent.width
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
|
@ -257,6 +258,70 @@ Window
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer: Item
|
||||
{
|
||||
width: printerListScrollView.width
|
||||
height: UM.Theme.getSize("card").height + UM.Theme.getSize("default_margin").height
|
||||
Rectangle
|
||||
{
|
||||
border.color: UM.Theme.getColor("lining")
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
|
||||
RowLayout
|
||||
{
|
||||
anchors
|
||||
{
|
||||
fill: parent
|
||||
leftMargin: (parent.height - infoIcon.height) / 2 //Same margin on the left as top and bottom.
|
||||
rightMargin: (parent.height - infoIcon.height) / 2
|
||||
}
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Rectangle //Info icon with a themeable color and background.
|
||||
{
|
||||
id: infoIcon
|
||||
width: UM.Theme.getSize("machine_selector_icon").width
|
||||
height: width
|
||||
Layout.preferredWidth: width
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
radius: height / 2
|
||||
color: UM.Theme.getColor("warning")
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
source: UM.Theme.getIcon("EmptyInfo")
|
||||
anchors.fill: parent
|
||||
color: UM.Theme.getColor("machine_selector_printer_icon")
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@text Asking the user whether printers are missing in a list.", "Printers missing?")
|
||||
+ "\n"
|
||||
+ catalog.i18nc("@text", "Make sure all your printers are turned ON and connected to Digital Factory.")
|
||||
font: UM.Theme.getFont("medium")
|
||||
elide: Text.ElideRight
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: refreshListButton
|
||||
text: catalog.i18nc("@button", "Refresh List")
|
||||
iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight")
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredWidth: width
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Cura.TertiaryButton
|
||||
|
|
3
resources/themes/cura-light/icons/default/EmptyInfo.svg
Normal file
3
resources/themes/cura-light/icons/default/EmptyInfo.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13 6H11V8H13V6ZM13 10H11V17H13V10Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 140 B |
Loading…
Add table
Add a link
Reference in a new issue