mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
SessionMenu: add LockScreen import
LockScreen: add missing imports N*Spectrum: add null checks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user