From ef457f7cb3acd0bbe957058d57ea4d6eddca41ef Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 25 Jan 2019 16:46:12 +0200 Subject: [PATCH] prioritize progress over notification at InfoBadge --the new behavior gives more priority to progress actions over notification items such as "unread emails". Progress actions at the end probably they will end and after that the number of notification items will be shown BUG: 403559 --- .../contents/ui/task/ProgressOverlay.qml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/plasmoid/package/contents/ui/task/ProgressOverlay.qml b/plasmoid/package/contents/ui/task/ProgressOverlay.qml index c61e77cdf..15ac3b0dd 100644 --- a/plasmoid/package/contents/ui/task/ProgressOverlay.qml +++ b/plasmoid/package/contents/ui/task/ProgressOverlay.qml @@ -71,10 +71,10 @@ Item { } height: 0.8 * parent.height numberValue: { - if (taskItem.badgeIndicator > 0) { - return taskItem.badgeIndicator; - } else if (taskIcon.smartLauncherItem) { + if (taskIcon.smartLauncherItem && (taskIcon.smartLauncherItem.countVisible || taskIcon.smartLauncherItem.progressVisible)) { return taskIcon.smartLauncherItem.count; + } else if (taskItem.badgeIndicator > 0) { + return taskItem.badgeIndicator; } return 0; @@ -88,16 +88,15 @@ Item { textWithBackgroundColor: false proportion: { - if (taskItem.badgeIndicator > 0 || - (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible)) { - return 100; + if (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.progressVisible) { + return taskIcon.smartLauncherItem.progress / 100; } - if (taskIcon.smartLauncherItem) { - return taskIcon.smartLauncherItem.progress / 100; - } else { - return 0; + if (taskItem.badgeIndicator > 0 || (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible)) { + return 100; } + + return 0; } readonly property bool showsAudioBadge: root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator