feat(terra): launcher rows slant only when selected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -253,6 +253,9 @@ Item {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
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)
|
||||
onClicked: root.launchRequested(index)
|
||||
@@ -266,21 +269,21 @@ Item {
|
||||
fillColor: row.selected ? Theme.selection : Theme.textAlpha(0.025)
|
||||
strokeColor: row.selected ? Theme.accent : Theme.textAlpha(0.10)
|
||||
strokeWidth: 1
|
||||
startX: 9; startY: 0
|
||||
startX: row.slant; startY: 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: 9; y: 0 }
|
||||
PathLine { x: row.slant; y: 0 }
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
fillColor: row.selected ? Theme.accent : Theme.textAlpha(0.12)
|
||||
strokeWidth: 0
|
||||
startX: 9; startY: 0
|
||||
PathLine { x: 13; y: 0 }
|
||||
startX: row.slant; startY: 0
|
||||
PathLine { x: row.slant + 4; y: 0 }
|
||||
PathLine { x: 4; y: rowShape.height }
|
||||
PathLine { x: 0; y: rowShape.height }
|
||||
PathLine { x: 9; y: 0 }
|
||||
PathLine { x: row.slant; y: 0 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user