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