nosignal-shell/components/StyledText.qml
2 * r + 2 * t 3191ea9757 feat: improve text anim
Force opacity only and use expressive effect curves
2026-04-23 00:59:43 +10:00

40 lines
789 B
QML

pragma ComponentBehavior: Bound
import QtQuick
import Caelestia.Config
import qs.services
Text {
id: root
property bool animate: false
renderType: Text.NativeRendering
textFormat: Text.PlainText
color: Colours.palette.m3onSurface
font: Tokens.font.body.small
Behavior on color {
CAnim {}
}
Behavior on text {
enabled: root.animate
SequentialAnimation {
Anim {
target: root
property: "opacity"
to: 0
type: Anim.FastEffects
}
PropertyAction {}
Anim {
target: root
property: "opacity"
to: 1
type: Anim.DefaultEffects
}
}
}
}