mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(NScrollText): Fix misalignment issue caused by overly large Unicode characters
This commit is contained in:
+11
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user