SessionMenu: add LockScreen import

LockScreen: add missing imports
N*Spectrum: add null checks
This commit is contained in:
Ly-sec
2025-11-09 09:46:45 +01:00
parent fb59883479
commit 871104be59
5 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ Item {
property real minimumSignalValue: 0.05 // Default to 5% of height
// Pre compute horizontal mirroring
readonly property int valuesCount: values.length
readonly property int valuesCount: (values && Array.isArray(values)) ? values.length : 0
readonly property int totalBars: valuesCount * 2
readonly property real barSlotSize: totalBars > 0 ? (vertical ? height : width) / totalBars : 0
@@ -27,7 +27,7 @@ Item {
property int valueIndex: index < root.valuesCount ? root.valuesCount - 1 - index // Mirrored half
: index - root.valuesCount // Normal half
property real rawAmp: root.values[valueIndex]
property real rawAmp: (root.values && root.values[valueIndex] !== undefined) ? root.values[valueIndex] : 0
property real amp: (root.showMinimumSignal && rawAmp === 0) ? root.minimumSignalValue : rawAmp
color: root.fillColor