refactor: ProcessList non-singleton with sortBy+active, each panel owns one instance gated on _showPanel
This commit is contained in:
parent
d55f9a0829
commit
8fdd9692e6
4 changed files with 28 additions and 23 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue