feat(terra): launcher rows slant only when selected

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 00:22:40 +02:00
co-authored by Claude Opus 5.5
parent 66760c1ded
commit cfbc14a9e7
@@ -253,6 +253,9 @@ Item {
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
readonly property bool selected: index === root.selectedIndex readonly property bool selected: index === root.selectedIndex
// Only the selected row is slanted; the rest are plain rectangles.
property real slant: selected ? 9 : 0
Behavior on slant { NumberAnimation { duration: 90; easing.type: Easing.OutCubic } }
onEntered: root.selectionRequested(index) onEntered: root.selectionRequested(index)
onClicked: root.launchRequested(index) onClicked: root.launchRequested(index)
@@ -266,21 +269,21 @@ Item {
fillColor: row.selected ? Theme.selection : Theme.textAlpha(0.025) fillColor: row.selected ? Theme.selection : Theme.textAlpha(0.025)
strokeColor: row.selected ? Theme.accent : Theme.textAlpha(0.10) strokeColor: row.selected ? Theme.accent : Theme.textAlpha(0.10)
strokeWidth: 1 strokeWidth: 1
startX: 9; startY: 0 startX: row.slant; startY: 0
PathLine { x: rowShape.width; y: 0 } PathLine { x: rowShape.width; y: 0 }
PathLine { x: rowShape.width - 9; y: rowShape.height } PathLine { x: rowShape.width - row.slant; y: rowShape.height }
PathLine { x: 0; y: rowShape.height } PathLine { x: 0; y: rowShape.height }
PathLine { x: 9; y: 0 } PathLine { x: row.slant; y: 0 }
} }
ShapePath { ShapePath {
fillColor: row.selected ? Theme.accent : Theme.textAlpha(0.12) fillColor: row.selected ? Theme.accent : Theme.textAlpha(0.12)
strokeWidth: 0 strokeWidth: 0
startX: 9; startY: 0 startX: row.slant; startY: 0
PathLine { x: 13; y: 0 } PathLine { x: row.slant + 4; y: 0 }
PathLine { x: 4; y: rowShape.height } PathLine { x: 4; y: rowShape.height }
PathLine { x: 0; y: rowShape.height } PathLine { x: 0; y: rowShape.height }
PathLine { x: 9; y: 0 } PathLine { x: row.slant; y: 0 }
} }
} }