consegnato come interruttore nella riga dell'ordine invece che voce di menu

This commit is contained in:
2026-10-09 09:12:50 +02:00
parent 40e4badbd4
commit a73d94a74e
+9 -13
View File
@@ -217,10 +217,6 @@ Page {
contentHeight: itemColumn.height + 2 * Theme.paddingMedium
menu: ContextMenu {
MenuItem {
text: orderItem.delivered ? page.tr("new_order") : page.tr("ready_delivery")
onClicked: page.toggleDelivered(index)
}
MenuItem {
text: page.tr("edit_order")
onClicked: page.openOrder(index)
@@ -235,7 +231,8 @@ Page {
id: itemColumn
x: Theme.horizontalPageMargin
y: Theme.paddingMedium
width: parent.width - 2 * Theme.horizontalPageMargin - statusLabel.width
width: parent.width - 2 * Theme.horizontalPageMargin - deliveredSwitch.width
- Theme.paddingMedium
Label {
width: parent.width
@@ -258,22 +255,21 @@ Page {
width: parent.width
truncationMode: TruncationMode.Fade
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.secondaryColor
text: page.tr("delivery") + ": " + model.delivery
color: model.late ? Theme.errorColor : Theme.secondaryColor
text: page.tr("delivery") + ": " + model.delivery + " " + model.status
}
}
Label {
id: statusLabel
// interruttore "consegnato": in Silica un Switch senza testo
Switch {
id: deliveredSwitch
anchors {
right: parent.right
rightMargin: Theme.horizontalPageMargin
verticalCenter: parent.verticalCenter
}
text: model.status
font.pixelSize: Theme.fontSizeExtraSmall
color: model.late ? Theme.errorColor
: (model.delivered ? Theme.secondaryColor : Theme.highlightColor)
checked: model.delivered
onClicked: page.toggleDelivered(index)
}
}