fix(AppUi): 给全屏开始菜单最近安装应用添加标记
This commit is contained in:
parent
62f2e6faae
commit
5670dcb391
|
@ -29,6 +29,7 @@ MouseArea {
|
||||||
property alias icon: appIcon
|
property alias icon: appIcon
|
||||||
property alias text: appName
|
property alias text: appName
|
||||||
property alias background: styleBackground
|
property alias background: styleBackground
|
||||||
|
property bool isRecentInstalled: false
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
|
@ -53,9 +54,27 @@ MouseArea {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: appName.contentHeight
|
||||||
|
Layout.maximumHeight: appName.contentHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
UkuiItems.StyleBackground {
|
||||||
|
id: tagPoint
|
||||||
|
property int tagSize: isRecentInstalled ? 8 : 0
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
visible: isRecentInstalled
|
||||||
|
Layout.preferredHeight: tagSize
|
||||||
|
Layout.preferredWidth: tagSize
|
||||||
|
radius: width / 2
|
||||||
|
useStyleTransparency: false
|
||||||
|
paletteRole: Platform.Theme.Highlight
|
||||||
|
}
|
||||||
|
|
||||||
UkuiItems.StyleText {
|
UkuiItems.StyleText {
|
||||||
id: appName
|
id: appName
|
||||||
Layout.fillWidth: true
|
Layout.maximumWidth: styleBackground.width - tagPoint.width
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
Layout.maximumHeight: contentHeight
|
Layout.maximumHeight: contentHeight
|
||||||
|
|
||||||
|
@ -66,3 +85,4 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -90,6 +90,7 @@ ListView {
|
||||||
|
|
||||||
text.text: model.name
|
text.text: model.name
|
||||||
icon.source: model.icon
|
icon.source: model.icon
|
||||||
|
isRecentInstalled: model.recentInstall
|
||||||
|
|
||||||
onClicked: (event) => {
|
onClicked: (event) => {
|
||||||
if (event.button === Qt.LeftButton) {
|
if (event.button === Qt.LeftButton) {
|
||||||
|
|
Loading…
Reference in New Issue