AudioVisualizer: respect bar location (fix #946)

MediaMini: cava respect bar location
NLinearSpectrum: use barPosition if needed
This commit is contained in:
Ly-sec
2025-12-05 15:36:51 +01:00
parent 479c719311
commit 81c6a17ba5
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -171,6 +171,7 @@ Item {
fillColor: root.fillColor
showMinimumSignal: true
vertical: root.isVerticalBar
barPosition: Settings.data.bar.position
}
}
+1
View File
@@ -392,6 +392,7 @@ Item {
values: CavaService.values
fillColor: Color.mPrimary
opacity: 0.4
barPosition: Settings.data.bar.position
}
}
+2 -1
View File
@@ -8,6 +8,7 @@ Item {
property int strokeWidth: 0
property var values: []
property bool vertical: false
property string barPosition: "top" // "top", "bottom", "left", "right"
// Minimum signal properties
property bool showMinimumSignal: false
@@ -40,7 +41,7 @@ Item {
// Only update when value actually changes - reduces GPU load
width: vertical ? root.width * amp : root.barSlotSize * 0.5
height: vertical ? root.barSlotSize * 0.5 : root.height * amp
x: vertical ? root.width - width : index * root.barSlotSize + (root.barSlotSize * 0.25)
x: vertical ? (root.barPosition === "left" ? 0 : root.width - width) : index * root.barSlotSize + (root.barSlotSize * 0.25)
y: vertical ? index * root.barSlotSize + (root.barSlotSize * 0.25) : root.height - height
// Disable updates when invisible to save GPU