From 9d87f32cbb57f81c4a3e750504144408c11d196f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Fri, 16 Apr 2021 19:24:07 +0800 Subject: [PATCH] fix text alignment error when font change --- doric-Qt/doric/resources/text.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doric-Qt/doric/resources/text.qml b/doric-Qt/doric/resources/text.qml index 2665292d..1b95d0e9 100644 --- a/doric-Qt/doric/resources/text.qml +++ b/doric-Qt/doric/resources/text.qml @@ -49,11 +49,19 @@ TextArea { onWidthChanged: { bg.implicitWidth = width console.log(tag, uuid + " onWidthChanged: " + this.width) + + let tempText = this.text + this.text = "" + this.text = tempText } onHeightChanged: { bg.implicitHeight = height console.log(tag, uuid + " onHeightChanged: " + this.height) + + let tempText = this.text + this.text = "" + this.text = tempText } MouseArea {