lista: ListItemLayout (titolo+paese+range senza sovrapposizioni); card porto vicino: binding con guardia, click centralizzato openPort, log

This commit is contained in:
2026-09-01 22:54:53 +02:00
parent bfd7369ec7
commit d6cc714ef9
2 changed files with 24 additions and 36 deletions
+8 -26
View File
@@ -83,32 +83,14 @@ Page {
contentHeight: Theme.itemSizeMedium
highlighted: model.isPreferred
Label {
text: model.name
color: model.isPreferred ? Theme.highlightColor : Theme.primaryColor
font.pixelSize: Theme.fontSizeMedium
anchors.left: parent.left
anchors.leftMargin: Theme.horizontalPageMargin
anchors.verticalCenter: parent.verticalCenter
truncationMode: TruncationMode.Fade
width: parent.width - 3 * Theme.horizontalPageMargin
}
Label {
text: model.country
color: Theme.secondaryColor
font.pixelSize: Theme.fontSizeSmall
anchors.left: parent.left
anchors.leftMargin: Theme.horizontalPageMargin
anchors.top: parent.top
anchors.topMargin: Theme.paddingSmall
}
Label {
text: model.range
color: Theme.secondaryColor
font.pixelSize: Theme.fontSizeSmall
anchors.right: parent.right
anchors.rightMargin: Theme.horizontalPageMargin
anchors.verticalCenter: parent.verticalCenter
ListItemLayout {
title.text: model.name
title.color: model.isPreferred ? Theme.highlightColor : Theme.primaryColor
title.truncationMode: TruncationMode.Fade
subtitle.text: model.country
subtitle.color: Theme.secondaryColor
summary.text: model.range
summary.color: Theme.secondaryColor
}
onClicked: {
console.log("[tide] open port:", model.name, "custom:", model.custom)