From 4b37f39fbd486d2fab8f0774f3f8ac60b00e5088 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 21 May 2021 20:36:50 +0300 Subject: [PATCH] tasks:switch of progress badge properly --fix Tasks option to be disabled properly --publish smart launcher settings to indicators independent of user options in Tasks badges BUG:437397 --- plasmoid/package/contents/ui/task/TaskIcon.qml | 11 +++++++---- .../contents/configuration/pages/TasksConfig.qml | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plasmoid/package/contents/ui/task/TaskIcon.qml b/plasmoid/package/contents/ui/task/TaskIcon.qml index a619d8126..414f7a573 100644 --- a/plasmoid/package/contents/ui/task/TaskIcon.qml +++ b/plasmoid/package/contents/ui/task/TaskIcon.qml @@ -40,7 +40,7 @@ Item { readonly property color backgroundColor: iconColorsLoader.active ? iconColorsLoader.item.backgroundColor : theme.backgroundColor readonly property color glowColor: iconColorsLoader.active ? iconColorsLoader.item.glowColor : theme.textColor - readonly property bool smartLauncherEnabled: ((taskItem.isStartup === false) && (root.showInfoBadge || root.showProgressBadge)) + readonly property bool smartLauncherEnabled: (taskItem.isStartup === false) //! it needs to be enabled independent of user-set option because it is used from indicators readonly property bool progressVisible: smartLauncherItem && smartLauncherItem.progressVisible readonly property real progress: smartLauncherItem && smartLauncherItem.progress ? smartLauncherItem.progress : 0 readonly property QtObject smartLauncherItem: smartLauncherLoader.active ? smartLauncherLoader.item : null @@ -152,10 +152,13 @@ Item { property real activateProgress: showInfo || showProgress || showAudio ? 1 : 0 - property bool showInfo: (root.showInfoBadge && taskIcon.smartLauncherItem - && (taskIcon.smartLauncherItem.countVisible || taskItem.badgeIndicator > 0) && !taskIcon.smartLauncherItem.progressVisible) + property bool showInfo: (root.showInfoBadge + && taskIcon.smartLauncherItem + && (taskIcon.smartLauncherItem.countVisible || taskItem.badgeIndicator > 0) + && !showProgress) - property bool showProgress: root.showProgressBadge && taskIcon.smartLauncherItem + property bool showProgress: root.showProgressBadge + && taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.progressVisible property bool showAudio: (root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio) diff --git a/shell/package/contents/configuration/pages/TasksConfig.qml b/shell/package/contents/configuration/pages/TasksConfig.qml index 749fdd169..e71c09507 100644 --- a/shell/package/contents/configuration/pages/TasksConfig.qml +++ b/shell/package/contents/configuration/pages/TasksConfig.qml @@ -87,7 +87,7 @@ PlasmaComponents.Page { value: tasks.configuration.showProgressBadge onClicked: { - tasks.configuration.showProgressBadge = tasks.configuration.showProgressBadge; + tasks.configuration.showProgressBadge = !tasks.configuration.showProgressBadge; } }