forked from Silverfish/proton-bridge
feat(GODT-2787): Replace the PathTracker by a more visual NavigationIndicator.
This commit is contained in:
committed by
Romain Le Jeune
parent
243ddf47ab
commit
ae4705ba70
@ -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
|
||||||
|
color: index <= currPath ? root.colorScheme.interaction_norm : root.colorScheme.interaction_weak
|
||||||
|
radius: width / 4
|
||||||
Label {
|
Label {
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
text: qsTr(modelData)
|
text: qsTr(modelData)
|
||||||
type: Label.Caption
|
type: Label.Caption
|
||||||
color: index === currPath ? colorScheme.interaction_norm : colorScheme.text_hint
|
color: "#FFFFFF"
|
||||||
}
|
padding: root._spacing / 2
|
||||||
Label {
|
anchors {
|
||||||
colorScheme: root.colorScheme
|
verticalCenter: parent.verticalCenter
|
||||||
text: "/"
|
horizontalCenter: parent.horizontalCenter
|
||||||
color: colorScheme.text_hint
|
|
||||||
type: Label.Caption
|
|
||||||
visible: index < (root.path.length - 1)
|
|
||||||
}
|
}
|
||||||
|
Layout.leftMargin: (parent.width - width) / 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user