Files
z-bar-qt/Components/CustomText.qml
T
AramJonghu da2ae635c0
C++ / fmt (pull_request) Successful in 13s
C++ / build & lint (pull_request) Canceled after 14s
JS/TS / fmt & lint (pull_request) Canceled after 7s
Python / fmt & lint (pull_request) Canceled after 12s
Python / test & nuitka build (pull_request) Canceled after 8s
Rust / clippy & fmt (pull_request) Canceled after 0s
chore(format): format files that were unformatted
2026-10-30 22:48:25 +01:00

52 lines
986 B
QML

pragma ComponentBehavior: Bound
import QtQuick
import ZShell.Config
import qs.Services
Text {
id: root
property bool animate: false
property int animateDuration: 400
property real animateFrom: 0
property string animateProp: "scale"
property real animateTo: 1
color: Colors.palette.m3onSurface
font: Tokens.font.body.small
linkColor: Colors.palette.m3onPrimaryFixedVariant
renderType: Text.QtRendering
textFormat: Text.PlainText
Behavior on color {
CAnim {}
}
Behavior on text {
enabled: root.animate
SequentialAnimation {
TAnim {
target: root
to: root.animateFrom
type: Anim.FastEffects
}
PropertyAction {}
TAnim {
target: root
to: root.animateTo
type: Anim.DefaultEffects
}
}
}
component TAnim: Anim {
duration: root.animateDuration / 2
properties: root.animateProp.split(",").length > 1 ? root.animateProp : ""
property: root.animateProp.split(",").length === 1 ? root.animateProp : ""
target: root
}
}