fix(NScrollText): Fix misalignment issue caused by overly large Unicode characters

This commit is contained in:
kyle
2026-01-27 01:37:20 +11:00
parent d595ed4cf7
commit 017a0072cb
+11 -4
View File
@@ -126,16 +126,23 @@ Item {
Loader {
id: titleText
sourceComponent: root.delegate
Layout.alignment: Qt.AlignVCenter
onLoaded: this.item.text = root.text
Layout.fillHeight: true
onLoaded: {
this.item.text = root.text;
// Bind height to container to enable vertical centering of overly high text
this.item.height = Qt.binding(() => titleText.height);
}
}
Loader {
id: loopingText
sourceComponent: root.delegate
Layout.alignment: Qt.AlignVCenter
Layout.fillHeight: true
visible: root.state !== NScrollText.ScrollState.None
onLoaded: this.item.text = root.text
onLoaded: {
this.item.text = root.text;
this.item.height = Qt.binding(() => loopingText.height);
}
}
NumberAnimation on x {