diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-04 22:45:15 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-04 22:45:15 +1000 |
| commit | c5381c5194adf97c240acb98eb4c4c950633b325 (patch) | |
| tree | 52b18eb1771ec6708c86f11d786684f03b8a7c48 /widgets/StyledTextField.qml | |
| parent | dashboard: display correct temp units (diff) | |
| download | caelestia-shell-c5381c5194adf97c240acb98eb4c4c950633b325.tar.gz caelestia-shell-c5381c5194adf97c240acb98eb4c4c950633b325.tar.bz2 caelestia-shell-c5381c5194adf97c240acb98eb4c4c950633b325.zip | |
internal: refactor widgets folder
Split into subdirs and rename to components
Diffstat (limited to 'widgets/StyledTextField.qml')
| -rw-r--r-- | widgets/StyledTextField.qml | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/widgets/StyledTextField.qml b/widgets/StyledTextField.qml deleted file mode 100644 index d4a470a..0000000 --- a/widgets/StyledTextField.qml +++ /dev/null @@ -1,85 +0,0 @@ -pragma ComponentBehavior: Bound - -import qs.services -import qs.config -import QtQuick -import QtQuick.Controls - -TextField { - id: root - - color: Colours.palette.m3onSurface - placeholderTextColor: Colours.palette.m3outline - font.family: Appearance.font.family.sans - font.pointSize: Appearance.font.size.smaller - renderType: TextField.NativeRendering - cursorVisible: !readOnly - - background: null - - cursorDelegate: StyledRect { - id: cursor - - property bool disableBlink - - implicitWidth: 2 - color: Colours.palette.m3primary - radius: Appearance.rounding.normal - - Connections { - target: root - - function onCursorPositionChanged(): void { - if (root.activeFocus && root.cursorVisible) { - cursor.opacity = 1; - cursor.disableBlink = true; - enableBlink.restart(); - } - } - } - - Timer { - id: enableBlink - - interval: 100 - onTriggered: cursor.disableBlink = false - } - - Timer { - running: root.activeFocus && root.cursorVisible && !cursor.disableBlink - repeat: true - triggeredOnStart: true - interval: 500 - onTriggered: parent.opacity = parent.opacity === 1 ? 0 : 1 - } - - Binding { - when: !root.activeFocus || !root.cursorVisible - cursor.opacity: 0 - } - - Behavior on opacity { - NumberAnimation { - duration: Appearance.anim.durations.small - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } - } - } - - Behavior on color { - ColorAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } - } - - Behavior on placeholderTextColor { - ColorAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } - } -} |