refactor: ProcessList non-singleton with sortBy+active, each panel owns one instance gated on _showPanel

This commit is contained in:
Damocles 2026-04-15 18:01:49 +02:00
parent d55f9a0829
commit 8fdd9692e6
4 changed files with 28 additions and 23 deletions

View file

@ -32,6 +32,11 @@ M.BarSection {
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
readonly property bool _showPanel: _anyHover || _pinned
property M.ProcessList _procs: M.ProcessList {
sortBy: "cpu"
active: root._showPanel
}
on_AnyHoverChanged: {
if (_anyHover)
_unpinTimer.stop();
@ -258,7 +263,7 @@ M.BarSection {
// Top processes by CPU
Repeater {
model: M.ProcessList.byCpu
model: root._procs.processes
delegate: Item {
required property var modelData