perf: gate sparkline repaints on panel visibility

This commit is contained in:
Damocles 2026-04-15 02:27:09 +02:00
parent 59547f81f1
commit 25c2ed1021

View file

@ -202,8 +202,18 @@ M.BarSection {
property var _hist: root._coreHistory[parent.parent.index] || [] property var _hist: root._coreHistory[parent.parent.index] || []
property color _col: parent.parent._barColor property color _col: parent.parent._barColor
on_HistChanged: requestPaint() on_HistChanged: if (root._showPanel)
on_ColChanged: requestPaint() requestPaint()
on_ColChanged: if (root._showPanel)
requestPaint()
Connections {
target: root
function on_ShowPanelChanged() {
if (root._showPanel)
sparkline.requestPaint();
}
}
onPaint: { onPaint: {
const ctx = getContext("2d"); const ctx = getContext("2d");