cpu/mem panels: drop floating header values, add total row to memory breakdown
This commit is contained in:
parent
736a8126e4
commit
69dff5a263
2 changed files with 25 additions and 82 deletions
|
|
@ -7,24 +7,6 @@ M.BarSection {
|
|||
spacing: Math.max(1, M.Theme.moduleSpacing - 2)
|
||||
tooltip: ""
|
||||
|
||||
property int usage: M.SystemStats.cpuUsage
|
||||
Behavior on usage {
|
||||
enabled: root._showPanel
|
||||
NumberAnimation {
|
||||
duration: 400
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
property real freqGhz: M.SystemStats.cpuFreqGhz
|
||||
Behavior on freqGhz {
|
||||
enabled: root._showPanel
|
||||
NumberAnimation {
|
||||
duration: 400
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
readonly property var _cores: M.SystemStats.cpuCores
|
||||
readonly property var _coreMaxFreq: M.SystemStats.cpuCoreMaxFreq
|
||||
readonly property var _coreTypes: M.SystemStats.cpuCoreTypes
|
||||
|
|
@ -100,53 +82,6 @@ M.BarSection {
|
|||
panelTitle: "CPU"
|
||||
contentWidth: 260
|
||||
|
||||
// Header — freq + usage (title comes from panelTitle)
|
||||
Item {
|
||||
width: parent.width
|
||||
height: 28
|
||||
|
||||
Text {
|
||||
id: _headerFreq
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.freqGhz.toFixed(2) + " GHz"
|
||||
color: root.accentColor
|
||||
font.pixelSize: M.Theme.fontSize
|
||||
font.family: M.Theme.fontFamily
|
||||
font.bold: true
|
||||
width: _headerFreqSizer.implicitWidth
|
||||
horizontalAlignment: Text.AlignRight
|
||||
|
||||
Text {
|
||||
id: _headerFreqSizer
|
||||
visible: false
|
||||
text: "9.99 GHz"
|
||||
font: parent.font
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.right: _headerFreq.left
|
||||
anchors.rightMargin: 6
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.usage + "%"
|
||||
color: root.accentColor
|
||||
font.pixelSize: M.Theme.fontSize
|
||||
font.family: M.Theme.fontFamily
|
||||
font.bold: true
|
||||
width: _headerUsageSizer.implicitWidth
|
||||
horizontalAlignment: Text.AlignRight
|
||||
|
||||
Text {
|
||||
id: _headerUsageSizer
|
||||
visible: false
|
||||
text: "100%"
|
||||
font: parent.font
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Per-core rows
|
||||
Repeater {
|
||||
model: root._cores.length
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue