cpu panel: add top processes list

This commit is contained in:
Damocles 2026-04-14 01:00:54 +02:00
parent 7e0021853f
commit db9e38d267

View file

@ -231,6 +231,49 @@ M.BarSection {
}
}
// Process list separator
Rectangle {
width: parent.width - 16
height: 1
anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03
}
// Top processes by CPU
Repeater {
model: M.ProcessList.byCpu
delegate: Item {
required property var modelData
width: hoverPanel.contentWidth
height: 20
Text {
anchors.left: parent.left
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
elide: Text.ElideRight
width: parent.width - 80
}
Text {
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cpu.toFixed(1) + "%"
color: root._loadColor(modelData.cpu)
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
width: 36
horizontalAlignment: Text.AlignRight
}
}
}
// Bottom padding
Item {
width: 1