diff --git a/widgets/ukui-task-manager/plugin/qml/TaskManagerView.qml b/widgets/ukui-task-manager/plugin/qml/TaskManagerView.qml index ab98f96..596d334 100644 --- a/widgets/ukui-task-manager/plugin/qml/TaskManagerView.qml +++ b/widgets/ukui-task-manager/plugin/qml/TaskManagerView.qml @@ -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) } } diff --git a/widgets/ukui-task-manager/qml/AppIcon.qml b/widgets/ukui-task-manager/qml/AppIcon.qml index fb55c78..203c890 100644 --- a/widgets/ukui-task-manager/qml/AppIcon.qml +++ b/widgets/ukui-task-manager/qml/AppIcon.qml @@ -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 diff --git a/widgets/ukui-task-manager/qml/AppList.qml b/widgets/ukui-task-manager/qml/AppList.qml index b428e74..3f5a796 100644 --- a/widgets/ukui-task-manager/qml/AppList.qml +++ b/widgets/ukui-task-manager/qml/AppList.qml @@ -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