diff --git a/applets/taskmanager/package/contents/ui/Task.qml b/applets/taskmanager/package/contents/ui/Task.qml --- a/applets/taskmanager/package/contents/ui/Task.qml +++ b/applets/taskmanager/package/contents/ui/Task.qml @@ -356,6 +356,13 @@ toolTipDelegate.activitiesParent = Qt.binding(function() { return model.Activities; }); + + toolTipDelegate.smartLauncherCountVisible = Qt.binding(function() { + return plasmoid.configuration.smartLaunchersEnabled && task.smartLauncherItem && task.smartLauncherItem.countVisible; + }); + toolTipDelegate.smartLauncherCount = Qt.binding(function() { + return toolTipDelegate.smartLauncherCountVisible ? task.smartLauncherItem.count : 0; + }); } } } @@ -411,6 +418,7 @@ } Loader { + id: taskBadgeLoader // QTBUG anchors.fill in conjunction with the Loader doesn't reliably work on creation: // have a window with a badge, move it from one screen to another, the new task item on the // other screen will now have a glitched out badge mask. diff --git a/applets/taskmanager/package/contents/ui/ToolTipDelegate.qml b/applets/taskmanager/package/contents/ui/ToolTipDelegate.qml --- a/applets/taskmanager/package/contents/ui/ToolTipDelegate.qml +++ b/applets/taskmanager/package/contents/ui/ToolTipDelegate.qml @@ -55,6 +55,9 @@ property bool isOnAllVirtualDesktopsParent property var activitiesParent // + property bool smartLauncherCountVisible + property int smartLauncherCount + readonly property bool isVerticalPanel: plasmoid.formFactor == PlasmaCore.Types.Vertical Layout.minimumWidth: contentItem.width diff --git a/applets/taskmanager/package/contents/ui/ToolTipInstance.qml b/applets/taskmanager/package/contents/ui/ToolTipInstance.qml --- a/applets/taskmanager/package/contents/ui/ToolTipInstance.qml +++ b/applets/taskmanager/package/contents/ui/ToolTipInstance.qml @@ -91,17 +91,43 @@ } // all textlabels Column { - PlasmaExtras.Heading { - level: 3 + RowLayout { width: isWin ? textWidth : undefined - height: undefined - maximumLineCount: 1 - elide: Text.ElideRight - text: appName - opacity: flatIndex == 0 - textFormat: Text.PlainText - visible: text !== "" + spacing: units.smallSpacing + + PlasmaExtras.Heading { + level: 3 + Layout.fillWidth: true + maximumLineCount: 1 + elide: Text.ElideRight + text: appName + opacity: flatIndex == 0 + textFormat: Text.PlainText + visible: text !== "" + } + + Rectangle { + width: units.iconSizes.smallMedium + height: units.iconSizes.smallMedium + radius: width + color: theme.highlightColor + visible: flatIndex === 0 && smartLauncherCountVisible + + PlasmaComponents.Label { + anchors.centerIn: parent + width: height + height: Math.round(parent.height) + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + fontSizeMode: Text.Fit + font.pointSize: 1024 + minimumPointSize: 5 + color: theme.backgroundColor + text: smartLauncherCount + } + } } + // window title PlasmaExtras.Heading { level: 5