diff --git a/applets/notifications/package/contents/ui/CompactRepresentation.qml b/applets/notifications/package/contents/ui/CompactRepresentation.qml --- a/applets/notifications/package/contents/ui/CompactRepresentation.qml +++ b/applets/notifications/package/contents/ui/CompactRepresentation.qml @@ -24,6 +24,8 @@ import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.quickcharts 1.0 as Charts + MouseArea { id: compactRoot @@ -66,29 +68,19 @@ elementId: "notification-inactive" - Item { - id: jobProgressItem - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: notificationIcon.width * (jobsPercentage / 100) + Charts.PieChart { + id: chart + + anchors.fill: parent - clip: true visible: false - PlasmaCore.SvgItem { - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: notificationIcon.width + range { from: 0; to: 100; automatic: false } - svg: notificationSvg - elementId: "notification-progress-active" - } + valueSources: Charts.SingleValueSource { value: compactRoot.jobsPercentage } + colorSource: Charts.SingleValueSource { value: theme.highlightColor } + + thickness: units.devicePixelRatio * 5 } PlasmaComponents.Label { @@ -138,12 +130,16 @@ } PropertyChanges { target: busyIndicator - visible: true + visible: compactRoot.jobsPercentage == 0 } PropertyChanges { target: jobProgressItem visible: true } + PropertyChanges { + target: chart + visible: true + } }, State { // do not disturb when: compactRoot.inhibited