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 contentHeight: itemColumn.height + 2 * Theme.paddingMedium
menu: ContextMenu { menu: ContextMenu {
MenuItem {
text: orderItem.delivered ? page.tr("new_order") : page.tr("ready_delivery")
onClicked: page.toggleDelivered(index)
}
MenuItem { MenuItem {
text: page.tr("edit_order") text: page.tr("edit_order")
onClicked: page.openOrder(index) onClicked: page.openOrder(index)
@@ -235,7 +231,8 @@ Page {
id: itemColumn id: itemColumn
x: Theme.horizontalPageMargin x: Theme.horizontalPageMargin
y: Theme.paddingMedium y: Theme.paddingMedium
width: parent.width - 2 * Theme.horizontalPageMargin - statusLabel.width width: parent.width - 2 * Theme.horizontalPageMargin - deliveredSwitch.width
- Theme.paddingMedium
Label { Label {
width: parent.width width: parent.width
@@ -258,22 +255,21 @@ Page {
width: parent.width width: parent.width
truncationMode: TruncationMode.Fade truncationMode: TruncationMode.Fade
font.pixelSize: Theme.fontSizeExtraSmall font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.secondaryColor color: model.late ? Theme.errorColor : Theme.secondaryColor
text: page.tr("delivery") + ": " + model.delivery text: page.tr("delivery") + ": " + model.delivery + " " + model.status
} }
} }
Label { // interruttore "consegnato": in Silica un Switch senza testo
id: statusLabel Switch {
id: deliveredSwitch
anchors { anchors {
right: parent.right right: parent.right
rightMargin: Theme.horizontalPageMargin rightMargin: Theme.horizontalPageMargin
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
text: model.status checked: model.delivered
font.pixelSize: Theme.fontSizeExtraSmall onClicked: page.toggleDelivered(index)
color: model.late ? Theme.errorColor
: (model.delivered ? Theme.secondaryColor : Theme.highlightColor)
} }
} }