diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-08-14 15:18:11 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-08-14 15:37:02 +0800 |
| commit | 4f69a5086f201fadddf5e8eb82e58134e43d34c1 (patch) | |
| tree | 6b5963d96539801df3f45b890c26109ad00f7342 | |
| parent | 495dfd94657c8adc28e0bb2d442fa9bf1f6a1f45 (diff) | |
perf(IText): more performant rendering type
| -rw-r--r-- | bar/TimeDate.qml | 4 | ||||
| -rw-r--r-- | components/IText.qml | 2 | ||||
| -rw-r--r-- | launcher/components/App.qml | 1 | ||||
| -rw-r--r-- | launcher/components/Clip.qml | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml index 8e554ef..2716e6d 100644 --- a/bar/TimeDate.qml +++ b/bar/TimeDate.qml @@ -58,6 +58,7 @@ Item { } IText { text: ":" + renderType: Text.CurveRendering } IText { animate: true @@ -65,11 +66,12 @@ Item { } IText { text: ":" + renderType: Text.CurveRendering } IText { animate: true text: (root.s >= 10 ? "" : "0") + root.s - renderType: Text.CurveRendering // it's not static and is rapidly updated + renderType: Text.QtRendering // it's not static and is rapidly updated } } Item { diff --git a/components/IText.qml b/components/IText.qml index b6a01b0..c528dc2 100644 --- a/components/IText.qml +++ b/components/IText.qml @@ -11,7 +11,7 @@ Text { property real animateFrom: 0 property real animateTo: 1 - renderType: Text.NativeRendering // or Text.CurveRenderer + renderType: Text.NativeRendering // or Text.CurveRendering(much more expansive) or Text.QtRendering for faster textFormat: Text.PlainText elide: Text.ElideRight color: Colors.foreground1 diff --git a/launcher/components/App.qml b/launcher/components/App.qml index 0ed16a3..8e0c61d 100644 --- a/launcher/components/App.qml +++ b/launcher/components/App.qml @@ -154,6 +154,7 @@ IComponent { } IText { text: modelData.name + renderType: Text.QtRendering } } diff --git a/launcher/components/Clip.qml b/launcher/components/Clip.qml index 789cd48..e9584e2 100644 --- a/launcher/components/Clip.qml +++ b/launcher/components/Clip.qml @@ -103,9 +103,11 @@ IComponent { IText { text: modelData?.isImage ? "Image" : "Text" || "" + renderType: Text.QtRendering } IText { text: modelData?.data || "" + renderType: Text.QtRendering } } |
