1
0

feat(GODT-2787): Replace the PathTracker by a more visual NavigationIndicator.

This commit is contained in:
Romain LE JEUNE
2023-07-31 18:29:16 +02:00
committed by Romain Le Jeune
parent 243ddf47ab
commit ae4705ba70

View File

@ -67,28 +67,30 @@ Item {
id: trackPath id: trackPath
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: root._topMargin Layout.topMargin: root._topMargin
Layout.bottomMargin: root._spacing Layout.bottomMargin: root._bottomMargin
Layout.leftMargin: (parent.width/2) - (contentItem.childrenRect.width/2)
spacing: root._spacing
interactive: false interactive: false
orientation: ListView.Horizontal orientation: ListView.Horizontal
model: path model: path
delegate: Item{ delegate: Rectangle{
width: children[0].width + children[0].spacing width: Math.max(100, children[0].width)
RowLayout { height: children[0].height
Label { color: index <= currPath ? root.colorScheme.interaction_norm : root.colorScheme.interaction_weak
colorScheme: root.colorScheme radius: width / 4
text: qsTr(modelData) Label {
type: Label.Caption colorScheme: root.colorScheme
color: index === currPath ? colorScheme.interaction_norm : colorScheme.text_hint text: qsTr(modelData)
} type: Label.Caption
Label { color: "#FFFFFF"
colorScheme: root.colorScheme padding: root._spacing / 2
text: "/" anchors {
color: colorScheme.text_hint verticalCenter: parent.verticalCenter
type: Label.Caption horizontalCenter: parent.horizontalCenter
visible: index < (root.path.length - 1)
} }
Layout.leftMargin: (parent.width - width) / 2
} }
} }