Commit 6e753e66 authored by David Edmundson's avatar David Edmundson
Browse files

Sync systemloadviewer showed items to ksysguard/system monitor

Summary:
We currently show how much cache is used. It's a completely useless value to know vs how much memory is free and leaves this applet out of sync with all the other memory monitors.

It's problematic because the bar is inconsistent with the tooltip, and
by default the system load viewer chooses a colour very similar to the
application used memory making the UI actually worse.

BUG: 391918

Test Plan:
Ran it
(there's some unrelated bugs/warnings in this applet that need fixing)
Bar showed a sensible value that matched tooltip, rather than
looking 100% full all the time

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: rkflx, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11558
parent 15802257
......@@ -9,9 +9,6 @@
<entry name="memApplicationColor" type="Color">
<default>blue</default>
</entry>
<entry name="memCachedColor" type="Color">
<default>green</default>
</entry>
<entry name="memBuffersColor" type="Color">
<default>yellow</default>
</entry>
......
......@@ -28,7 +28,6 @@ ColumnLayout {
property alias cfg_memApplicationColor: memApplicationColorPicker.color
property alias cfg_memBuffersColor: memBuffersColorPicker.color
property alias cfg_memCachedColor: memCachedColorPicker.color
property alias cfg_cpuUserColor: cpuUserColorPicker.color
property alias cfg_cpuIOWaitColor: cpuIOWaitColorPicker.color
property alias cfg_cpuSysColor: cpuSysColorPicker.color
......@@ -116,15 +115,6 @@ ColumnLayout {
id: memBuffersColorPicker
}
Label {
text: i18nc("@label:chooser", "Cached:")
Layout.alignment: Qt.AlignRight
}
KQuickControls.ColorButton {
id: memCachedColorPicker
}
Label {
text: i18nc("@title:group", "Swap")
Layout.columnSpan: 2
......
......@@ -48,11 +48,9 @@ Item {
theme.linkColor]
property var memoryColors: setColorsManually ? [plasmoid.configuration.memApplicationColor,
plasmoid.configuration.memBuffersColor,
plasmoid.configuration.memCachedColor]
plasmoid.configuration.memBuffersColor]
: [theme.buttonFocusColor,
theme.visitedLinkColor,
theme.highlightColor]
theme.visitedLinkColor]
property var swapColors: setColorsManually ? [plasmoid.configuration.swapUsedColor]
: [theme.highlightColor]
......@@ -139,7 +137,6 @@ Item {
property string memFree: memPhysical + "free"
property string memApplication: memPhysical + "application"
property string memBuffers: memPhysical + "buf"
property string memCached: memPhysical + "cached"
property string memUsed: memPhysical + "used"
property string swap: "mem/swap/"
property string swapUsed: swap + "used"
......@@ -151,7 +148,7 @@ Item {
property var totalCpuLoadProportions: [.0, .0, .0, .0]
property int maxCpuIndex: 0
property var memoryUsageProportions: [.0, .0, .0]
property var memoryUsageProportions: [.0, .0]
property double swapUsageProportion: .0
property var cacheUsageProportions: [.0, .0]
......@@ -162,7 +159,7 @@ Item {
function sources() {
var array = [niceLoad, userLoad, sysLoad,
ioWait, memFree, memApplication, memBuffers,
memCached, memUsed, swapUsed, swapFree,
memUsed, swapUsed, swapFree,
averageClock, totalLoad, cores, cacheDirty,
cacheWriteback]
......@@ -199,10 +196,6 @@ Item {
else if (sourceName == memBuffers) {
memoryUsageProportions[1] = fitMemoryUsage(data.value)
}
else if (sourceName == memCached) {
memoryUsageProportions[2] = fitMemoryUsage(data.value)
memoryUsageProportionsChanged()
}
else if (sourceName == swapUsed) {
swapUsageProportion = fitSwapUsage(data.value)
swapUsageProportionChanged()
......
Supports Markdown
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