fix(qml/AppUI): 修改issue I9SG56: 部分位置悬浮不显示缩略内容
This commit is contained in:
parent
6be045f9b4
commit
4c9314c63a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue