diff --git a/declarativeimports/components/BadgeText.qml b/declarativeimports/components/BadgeText.qml index 4db82bc3b..15a1d7aaf 100644 --- a/declarativeimports/components/BadgeText.qml +++ b/declarativeimports/components/BadgeText.qml @@ -47,14 +47,14 @@ Rectangle { property double partSize: height / 2 property double pi2: Math.PI * 2 - property color alphaBackColor: Qt.rgba(theme.backgroundColor.r, theme.backgroundColor.g, theme.backgroundColor.b, 0.45) - property color alphaBackColor2: Qt.rgba(theme.backgroundColor.r, theme.backgroundColor.g, theme.backgroundColor.b, 0.8) - width: Math.max(minimumWidth, valueText.width + 4*units.smallSpacing) - color: theme.backgroundColor //mainItemContainer.badgeIndicator > 0 ? alphaBackColor2 : alphaBackColor + color: theme.backgroundColor radius: (radiusPerCentage / 100) * (height / 2) - border.width: Math.max(1,width/64) + border.width: 1 //Math.max(1,width/64) + + property color textColor: theme.textColor + property color highlightedColor: theme.buttonFocusColor onProportionChanged: { // console.log(previousProportion + " - "+proportion); @@ -86,7 +86,7 @@ Rectangle { anchors.centerIn: parent - property color drawColor: theme.buttonFocusColor; //mainItemContainer.badgeIndicator > 0 ? theme.buttonFocusColor : theme.highlightColor; + property color drawColor: highlightedColor onDrawColorChanged: requestPaint(); @@ -144,7 +144,7 @@ Rectangle { } font.pixelSize: 0.62 * parent.height font.bold: true - color: textWithBackgroundColor ? theme.backgroundColor : theme.textColor + color: textWithBackgroundColor ? parent.color : parent.textColor visible: showNumber || showText } @@ -155,9 +155,10 @@ Rectangle { anchors.leftMargin: parent.border.width anchors.rightMargin: parent.border.width color: "transparent" - border.width: parent.border.width - border.color: parent.alphaBackColor2 + border.width: parent.border.width+1 + border.color: "black" radius: parent.radius + opacity: 0.4 } Rectangle{ diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 801a9e636..ce39b59e8 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -103,15 +103,20 @@ Item { property int internalWidthMargins: root.vertical ? thickMargins : 2 * lengthIntMargin property int internalHeightMargins: !root.vertical ? thickMargins : 2 * lengthIntMargin - property real textColorBrightness: ColorizerTools.colorBrightness(theme.textColor) + property real textColorBrightness: ColorizerTools.colorBrightness(themeTextColor) property color minimizedDotColor: { if (latteView) { return latteView.minimizedDotColor; } - return textColorBrightness > 127.5 ? Qt.darker(theme.textColor, 1.7) : Qt.lighter(theme.textColor, 7) + return textColorBrightness > 127.5 ? Qt.darker(themeTextColor, 1.7) : Qt.lighter(themeBackgroundColor, 7) } + property color themeTextColor: theme.textColor + property color themeBackgroundColor: theme.backgroundColor + + property color lightTextColor: textColorBrightness > 127.5 ? themeTextColor : themeBackgroundColor + //a small badgers record (id,value) //in order to track badgers when there are changes //in launcher reference from libtaskmanager diff --git a/plasmoid/package/contents/ui/task/ProgressOverlay.qml b/plasmoid/package/contents/ui/task/ProgressOverlay.qml index 946711fca..5b2f58012 100644 --- a/plasmoid/package/contents/ui/task/ProgressOverlay.qml +++ b/plasmoid/package/contents/ui/task/ProgressOverlay.qml @@ -59,7 +59,7 @@ Item { LatteComponents.BadgeText { id: progressCircle anchors.centerIn: parent - border.color: root.minimizedDotColor + border.color: textColor minimumWidth: Math.min(0.8 * parent.height, maximumWidth) maximumWidth: { if (showsAudioBadge) { @@ -83,9 +83,18 @@ Item { fullCircle: true showNumber: true - /*textWithBackgroundColor: ( (taskItem.badgeIndicator > 0) - || (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible) ) - && proportion>0*/ + color: theme.backgroundColor + textColor: showsInfoBadge ? root.lightTextColor : theme.textColor + + highlightedColor: { + if (showsInfoBadge) { + return theme.negativeTextColor + } + + return theme.buttonFocusColor; + } + + textWithBackgroundColor: false proportion: { @@ -100,6 +109,9 @@ Item { return 0; } + readonly property bool showsInfoBadge: ((taskItem.badgeIndicator > 0) + || (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible)) + readonly property bool showsAudioBadge: root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator } } diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index 37069a3a1..8a7fe4b21 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -1361,7 +1361,7 @@ MouseArea{ function updateBadge() { var badger = root.getBadger(launcherUrl); - if (badger && !isLauncher) { + if (badger) { badgeIndicator = parseInt(badger.value); } else { badgeIndicator = 0;