From 4c9314c63afde65fa4234f872fb1df2bd7e3d190 Mon Sep 17 00:00:00 2001 From: youdiansaodongxi Date: Thu, 11 Jul 2024 15:17:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(qml/AppUI):=20=E4=BF=AE=E6=94=B9issue=20I9S?= =?UTF-8?q?G56:=20=E9=83=A8=E5=88=86=E4=BD=8D=E7=BD=AE=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=BC=A9=E7=95=A5=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qml/AppUI/AppLabelPage.qml | 11 +++++++++++ qml/AppUI/FullScreenAppItem.qml | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/qml/AppUI/AppLabelPage.qml b/qml/AppUI/AppLabelPage.qml index 0be89a5..d6e0297 100644 --- a/qml/AppUI/AppLabelPage.qml +++ b/qml/AppUI/AppLabelPage.qml @@ -43,6 +43,13 @@ GridView { focus: true hoverEnabled: true + UkuiItems.Tooltip { + anchors.fill: parent + mainText: modelData.label + posFollowCursor: true + active: labelArea.showTooltip + } + onClicked: { GridView.view.labelSelected(modelData.label); GridView.view.currentIndex = model.index @@ -55,6 +62,9 @@ GridView { } UkuiItems.StyleBackground { + id: labelArea + property bool showTooltip: labelText.visible ? labelText.truncated : false + anchors.fill: parent radius: Platform.Theme.normalRadius @@ -66,6 +76,7 @@ GridView { borderColor: Platform.Theme.Highlight UkuiItems.StyleText { + id: labelText anchors.fill: parent visible: modelData.type === LabelItem.Text text: modelData.display diff --git a/qml/AppUI/FullScreenAppItem.qml b/qml/AppUI/FullScreenAppItem.qml index 4aa1b71..6c35bd8 100644 --- a/qml/AppUI/FullScreenAppItem.qml +++ b/qml/AppUI/FullScreenAppItem.qml @@ -33,6 +33,13 @@ MouseArea { hoverEnabled: true + UkuiItems.Tooltip { + anchors.fill: parent + mainText: text.text + posFollowCursor: true + active: text.truncated + } + UkuiItems.StyleBackground { id: styleBackground anchors.fill: parent