Commit 9b8029fd authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Task Manager] Show badge count also in tooltip

When your panel is too narrow the badge icon cannot be shown, so show it in the tooltip as well.

Differential Revision: https://phabricator.kde.org/D9825
parent c31e5963
......@@ -356,6 +356,13 @@ MouseArea {
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;
});
}
}
}
......
......@@ -55,6 +55,9 @@ PlasmaExtras.ScrollArea {
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
......
......@@ -126,6 +126,15 @@ Column {
visible: text !== ""
}
}
// Count badge.
Badge {
Layout.alignment: Qt.AlignRight | Qt.AlignTop
height: units.iconSizes.smallMedium
visible: flatIndex === 0 && smartLauncherCountVisible
number: smartLauncherCount
}
// close button
MouseArea {
Layout.alignment: Qt.AlignRight | Qt.AlignTop
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment