1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 05:52:50 -05:00

Revert "Implement some data smoothing"

This reverts commit 8bef7ded1e.
This commit is contained in:
bbedward
2025-08-09 20:01:26 -04:00
parent 8bef7ded1e
commit 218eefbe19
5 changed files with 18 additions and 69 deletions

View File

@@ -71,7 +71,7 @@ Column {
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: DankgopService.smoothedCpuUsage.toFixed(1) + "%"
text: DankgopService.cpuUsage.toFixed(1) + "%"
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Bold
color: Theme.primary

View File

@@ -62,10 +62,10 @@ Rectangle {
name: DankgopService.getProcessIcon(process ? process.command : "")
size: Theme.iconSize - 4
color: {
if (process && process.smoothedCpu > 80)
if (process && process.cpu > 80)
return Theme.error
if (process && process.smoothedCpu > 50)
if (process && process.cpu > 50)
return Theme.warning
return Theme.surfaceText
@@ -95,10 +95,10 @@ Rectangle {
height: 20
radius: Theme.cornerRadius
color: {
if (process && process.smoothedCpu > 80)
if (process && process.cpu > 80)
return Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12)
if (process && process.smoothedCpu > 50)
if (process && process.cpu > 50)
return Qt.rgba(Theme.warning.r, Theme.warning.g,
Theme.warning.b, 0.12)
@@ -110,15 +110,15 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: DankgopService.formatCpuUsage(process ? process.smoothedCpu : 0)
text: DankgopService.formatCpuUsage(process ? process.cpu : 0)
font.pixelSize: Theme.fontSizeSmall
font.family: SettingsData.monoFontFamily
font.weight: Font.Bold
color: {
if (process && process.smoothedCpu > 80)
if (process && process.cpu > 80)
return Theme.error
if (process && process.smoothedCpu > 50)
if (process && process.cpu > 50)
return Theme.warning
return Theme.surfaceText

View File

@@ -57,9 +57,9 @@ Row {
StyledText {
text: {
if (DankgopService.smoothedCpuUsage === undefined || DankgopService.smoothedCpuUsage === null)
if (DankgopService.cpuUsage === undefined || DankgopService.cpuUsage === null)
return "--%"
return DankgopService.smoothedCpuUsage.toFixed(1) + "%"
return DankgopService.cpuUsage.toFixed(1) + "%"
}
font.pixelSize: Theme.fontSizeLarge
font.family: SettingsData.monoFontFamily