1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00

lock: add blinking cursor for text input

fixes #2316
This commit is contained in:
bbedward
2026-07-02 15:20:11 -04:00
parent e423e17807
commit 2663bcd96c
3 changed files with 101 additions and 21 deletions
@@ -598,29 +598,20 @@ Column {
topPadding: Theme.spacingM
rightPadding: Theme.spacingM
bottomPadding: Theme.spacingM
cursorDelegate: Rectangle {
cursorDelegate: DankTextCursor {
id: notepadCursor
width: 1.5
radius: 1
color: Theme.surfaceText
x: textArea.cursorRectangle.x
y: textArea.cursorRectangle.y
height: textArea.cursorRectangle.height
opacity: 1.0
shown: textArea.cursorVisible
SequentialAnimation on opacity {
running: textArea.activeFocus
loops: Animation.Infinite
OpacityAnimator {
from: 1.0
to: 0.0
duration: 650
easing.type: Easing.InOutQuad
}
OpacityAnimator {
from: 0.0
to: 1.0
duration: 650
easing.type: Easing.InOutQuad
Connections {
target: textArea
function onCursorPositionChanged() {
notepadCursor.resetBlink();
}
}
}