update info badges color for tasks notifications

--info badges updated their colors in order to attract
more attention on them. Most themes etc. use for their
negativeTextColor a reddish color so that is a good
match for this.
pull/5/head
Michail Vourlakos
parent 854840b8fc
commit 12e8863f4b

@ -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{

@ -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

@ -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
}
}

@ -1361,7 +1361,7 @@ MouseArea{
function updateBadge() {
var badger = root.getBadger(launcherUrl);
if (badger && !isLauncher) {
if (badger) {
badgeIndicator = parseInt(badger.value);
} else {
badgeIndicator = 0;

Loading…
Cancel
Save