Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 64045dbd authored by Nate Graham's avatar Nate Graham 🔩

Improve up/down display for Monitor widgets

Summary: This patch improves the up/down display for the Monitor widgets

Test Plan:
Before, no activity: {F6549441}

After, no activity: {F6550787}

Before, some activity: {F6549443}

After, some activity: {F6550788}

All the other ones still look good or are improved: {F6550789}

Reviewers: #plasma, #vdg

Subscribers: abetts, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18255
parent 0885170d
......@@ -54,12 +54,15 @@ KQuickAddons.Plotter {
return Qt.hsla(hue, saturation, lightness, 1.0);
}
property string downloadColor: theme.highlightColor
property string uploadColor: cycle(theme.highlightColor, -90)
dataSets: [
KQuickAddons.PlotData {
color: theme.highlightColor
color: downloadColor
},
KQuickAddons.PlotData {
color: cycle(theme.highlightColor, -90)
color: uploadColor
}
]
......@@ -99,7 +102,11 @@ KQuickAddons.Plotter {
if (plasmoid.formFactor != PlasmaCore.Types.Vertical) {
nameLabel.text = plotter.sensorName
speedLabel.text = formatData(data1) + " | " + formatData(data2)
speedLabel.text = i18n("<font color='%1'>⬇</font> %2 | <font color='%3'>⬆</font> %4",
downloadColor,
formatData(data1),
uploadColor,
formatData(data2))
} else {
nameLabel.text = plotter.sensorName+ "\n" + formatData(data1) + "\n" + formatData(data2)
speedLabel.text = ""
......
......@@ -48,10 +48,7 @@ Applet {
if (value > 1024) {
return i18nc("%1 is the displayed data transfer speed in kilobits per second", "%1 Kbps", (value / 1024));
}
if (value > 0) {
return i18nc("%1 is the displayed data transfer speed in bits per second", "%1 bps", value);
}
return value;
return i18nc("%1 is the displayed data transfer speed in bits per second", "%1 bps", value);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment