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

@ -21,6 +21,11 @@ M.BarSection {
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
readonly property bool _showPanel: _anyHover || _pinned
property M.ProcessList _procs: M.ProcessList {
sortBy: "mem"
active: root._showPanel
}
on_AnyHoverChanged: {
if (_anyHover)
_unpinTimer.stop();
@ -223,7 +228,7 @@ M.BarSection {
// Top processes by memory
Repeater {
model: M.ProcessList.byMem
model: root._procs.processes
delegate: Item {
required property var modelData