From 5fd8d0f6da23030cbe043c5fd59284393781e23a Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 29 Apr 2025 10:29:30 +1000 Subject: refactor: use anchors instead of layouts --- widgets/Label.qml | 16 ---------------- widgets/MaterialIcon.qml | 2 +- widgets/StyledText.qml | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 widgets/Label.qml create mode 100644 widgets/StyledText.qml (limited to 'widgets') diff --git a/widgets/Label.qml b/widgets/Label.qml deleted file mode 100644 index e1e22ba..0000000 --- a/widgets/Label.qml +++ /dev/null @@ -1,16 +0,0 @@ -import "root:/config" -import QtQuick - -Text { - id: root - - renderType: Text.NativeRendering - - Behavior on color { - ColorAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } - } -} diff --git a/widgets/MaterialIcon.qml b/widgets/MaterialIcon.qml index 55e6b99..2181f9c 100644 --- a/widgets/MaterialIcon.qml +++ b/widgets/MaterialIcon.qml @@ -1,7 +1,7 @@ import "root:/config" import QtQuick -Label { +StyledText { font.family: Appearance.font.family.material font.pointSize: Appearance.font.size.larger } diff --git a/widgets/StyledText.qml b/widgets/StyledText.qml new file mode 100644 index 0000000..ed5d791 --- /dev/null +++ b/widgets/StyledText.qml @@ -0,0 +1,18 @@ +import "root:/config" +import QtQuick + +Text { + id: root + + renderType: Text.NativeRendering + color: Appearance.colours.text + font.family: Appearance.font.family.sans + + Behavior on color { + ColorAnimation { + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } + } +} -- cgit v1.2.3-freya