Files
z-bar-qt/Components/CustomText.qml
T
zach 25bee293b0
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 9s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 34s
Rust / build (pull_request) Successful in 1m10s
Python / verify (pull_request) Successful in 1m53s
Rust / fmt (pull_request) Successful in 34s
Rust / clippy (pull_request) Successful in 57s
feat: fontbuilder to streamline font styling
2026-09-21 15:37:45 +02:00

52 lines
990 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.NativeRendering
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
}
}