forked from openkylin/ukui-panel
feat(taskManager):添加接受新消息时应用窗口高亮提示
This commit is contained in:
parent
7b5f2e14c6
commit
9d1a6d6102
|
@ -171,7 +171,14 @@ ListView {
|
|||
id: content
|
||||
property var currentWinIdList: model.CurrentWinIdList
|
||||
property var modelIcon: model.Icon
|
||||
property var demandsAttentionWinIdList: model.DemandsAttentionWinIdList
|
||||
|
||||
sourceComponent: isMergeApp ? appIconComponent : applistComponent
|
||||
onCurrentWinIdListChanged: {
|
||||
if (!currentWinIdList) {
|
||||
currentWinIdList = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
|
@ -198,7 +205,6 @@ ListView {
|
|||
appBackgroud.alpha: mouseArea.containsPress ? 0.10 : mouseArea.containsMouse ? 0.05 : 0
|
||||
appIcon.source: modelIcon
|
||||
appIcon.scale: mouseArea.containsPress ? 0.9 : 1.0
|
||||
appStateTip.width: Math.min(currentWinIdList.length * 8, 16)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.ukui.publicItems 1.0 as PublicItems
|
|||
Item {
|
||||
property alias appIcon: icon
|
||||
property alias appBackgroud: backgroud
|
||||
property alias appStateTip: stateTip
|
||||
|
||||
PublicItems.StyleBackground {
|
||||
id: backgroud
|
||||
anchors.fill: parent
|
||||
|
@ -14,6 +14,23 @@ Item {
|
|||
paletteRole: PublicItems.Theme.BrightText
|
||||
radius: 8
|
||||
|
||||
Rectangle {
|
||||
id: demandsAttention
|
||||
anchors.fill: parent
|
||||
color: "#FF9100"
|
||||
z: -1
|
||||
radius: 8
|
||||
visible: demandsAttentionWinIdList.length > 0
|
||||
|
||||
NumberAnimation on opacity {
|
||||
running: demandsAttention.visible
|
||||
loops: 4
|
||||
from: 0.25
|
||||
to: 0.6
|
||||
duration: 450
|
||||
}
|
||||
}
|
||||
|
||||
PublicItems.ThemeIcon {
|
||||
id: icon
|
||||
anchors.margins: 4
|
||||
|
@ -24,8 +41,8 @@ Item {
|
|||
}
|
||||
}
|
||||
PublicItems.StyleBackground {
|
||||
id: stateTip
|
||||
height: 4
|
||||
width: Math.min(currentWinIdList.length * 8, 16)
|
||||
radius: 2
|
||||
|
||||
anchors.verticalCenter: backgroud.bottom
|
||||
|
|
|
@ -44,7 +44,7 @@ Item {
|
|||
}
|
||||
PublicItems.StyleBackground {
|
||||
id: visualDelegate
|
||||
width: childrenRect.width
|
||||
width: viewLayout.width
|
||||
height: root.itemSize
|
||||
|
||||
useStyleTransparency: false
|
||||
|
@ -60,7 +60,7 @@ Item {
|
|||
State {
|
||||
name: "normal"
|
||||
ParentChange { target: visualDelegate; parent: normalLayout; x: 0; y: 0 }
|
||||
PropertyChanges { target: visualDelegate; width: childrenRect.width }
|
||||
PropertyChanges { target: visualDelegate; width: viewLayout.width }
|
||||
},
|
||||
State {
|
||||
name: "dragging"
|
||||
|
@ -103,10 +103,28 @@ Item {
|
|||
}
|
||||
]
|
||||
|
||||
Rectangle {
|
||||
id: demandsAttention
|
||||
anchors.fill: parent
|
||||
color: "#FF9100"
|
||||
radius: 8
|
||||
visible: demandsAttentionWinIdList.includes(modelData)
|
||||
|
||||
NumberAnimation on opacity {
|
||||
running: demandsAttention.visible
|
||||
loops: 4
|
||||
from: 0.25
|
||||
to: 0.6
|
||||
duration: 450
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: viewLayout
|
||||
height: parent.height
|
||||
spacing: 0
|
||||
onChildrenRectChanged: width = childrenRect.width
|
||||
z: 1
|
||||
|
||||
PublicItems.ThemeIcon {
|
||||
id: themeicon
|
||||
|
|
Loading…
Reference in New Issue