diff --git a/containment/package/contents/ui/applet/ShortcutBadge.qml b/containment/package/contents/ui/applet/ShortcutBadge.qml index d1e67d054..70a8bfc07 100644 --- a/containment/package/contents/ui/applet/ShortcutBadge.qml +++ b/containment/package/contents/ui/applet/ShortcutBadge.qml @@ -25,7 +25,10 @@ import org.kde.latte 0.2 as Latte Loader{ id: appletNumberLoader - active: isValidDelayer > 0 + active: appletItem.canShowAppletNumberBadge && + ((root.showAppletsNumbers && root.unifiedGlobalShortcuts) + || (root.showMetaBadge && applet.id===applicationLauncherId)) + asynchronous: true visible: badgeString!=="" @@ -40,14 +43,6 @@ Loader{ Component.onCompleted: fixedIndex = parabolicManager.pseudoAppletIndex(index); - property real isValidDelayer: appletItem.canShowAppletNumberBadge && - ((root.showAppletsNumbers && root.unifiedGlobalShortcuts) - || (root.showMetaBadge && applet.id===applicationLauncherId)) ? 1 : 0 - - Behavior on isValidDelayer { - NumberAnimation { duration: root.durationTime*units.longDuration } - } - Binding{ target: appletNumberLoader property:"badgeString" diff --git a/plasmoid/package/contents/ui/task/IconItem.qml b/plasmoid/package/contents/ui/task/IconItem.qml index 99cb45e79..e67caa7a0 100644 --- a/plasmoid/package/contents/ui/task/IconItem.qml +++ b/plasmoid/package/contents/ui/task/IconItem.qml @@ -573,7 +573,7 @@ Item{ Loader{ id: taskNumberLoader anchors.fill: iconImageBuffer - active: isValidDelayer>0 && !launcherAnimation.running + active: root.showTasksNumbers && !taskItem.isSeparator && fixedIndex>=0 && fixedIndex<20 asynchronous: true visible: badgeString !== "" @@ -581,20 +581,13 @@ Item{ property string badgeString: (taskNumberLoader.fixedIndex>=1 && taskNumberLoader.fixedIndex<20 && root.badgesForActivate.length===19) ? root.badgesForActivate[taskNumberLoader.fixedIndex-1] : "" - onActiveChanged: { - if (active) { - fixedIndex = parabolicManager.pseudoTaskIndex(index+1); - } + Connections { + target: root + onShowTasksNumbersChanged: taskNumberLoader.fixedIndex = parabolicManager.pseudoTaskIndex(index+1); } Component.onCompleted: fixedIndex = parabolicManager.pseudoTaskIndex(index+1); - property real isValidDelayer: root.showTasksNumbers && !taskItem.isSeparator && fixedIndex<20 ? 1 : 0 - - Behavior on isValidDelayer { - NumberAnimation { duration: root.durationTime*units.longDuration } - } - sourceComponent: Item{ Loader{ anchors.fill: taskNumber