dashboard crash fix #70
@@ -38,55 +38,55 @@ Item {
|
||||
onTriggered: Players.active?.positionChanged()
|
||||
}
|
||||
|
||||
ServiceRef {
|
||||
service: Audio.cava
|
||||
}
|
||||
// ServiceRef {
|
||||
// service: Audio.cava
|
||||
// }
|
||||
|
||||
Shape {
|
||||
id: visualizer
|
||||
|
||||
readonly property real barW: Math.max(0, (width - gap * (bars - 1)) / bars)
|
||||
readonly property int bars: Config.services.visualizerBars
|
||||
property color color: DynamicColors.palette.m3primary
|
||||
readonly property real gap: Appearance.spacing.small
|
||||
|
||||
anchors.fill: layout
|
||||
asynchronous: true
|
||||
data: visualizerBars.instances
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
}
|
||||
|
||||
Variants {
|
||||
id: visualizerBars
|
||||
|
||||
model: Array.from({
|
||||
length: Config.services.visualizerBars
|
||||
}, (_, i) => i)
|
||||
|
||||
ShapePath {
|
||||
id: visualizerBar
|
||||
|
||||
readonly property real magnitude: value * Config.dashboard.sizes.mediaVisualiserSize
|
||||
required property int modelData
|
||||
readonly property real value: Math.max(1e-3, Audio.cava.values[modelData])
|
||||
|
||||
capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
startX: (visualizer.barW / 2) + modelData * (visualizer.barW + visualizer.gap)
|
||||
startY: layout.y + layout.height
|
||||
strokeColor: visualizer.color
|
||||
strokeWidth: visualizer.barW
|
||||
|
||||
Behavior on strokeColor {
|
||||
CAnim {
|
||||
}
|
||||
}
|
||||
|
||||
PathLine {
|
||||
relativeX: 0
|
||||
relativeY: -visualizerBar.magnitude
|
||||
}
|
||||
}
|
||||
}
|
||||
// Shape {
|
||||
// id: visualizer
|
||||
//
|
||||
// readonly property real barW: Math.max(0, (width - gap * (bars - 1)) / bars)
|
||||
// readonly property int bars: Config.services.visualizerBars
|
||||
// property color color: DynamicColors.palette.m3primary
|
||||
// readonly property real gap: Appearance.spacing.small
|
||||
//
|
||||
// anchors.fill: layout
|
||||
// asynchronous: true
|
||||
// data: visualizerBars.instances
|
||||
// preferredRendererType: Shape.CurveRenderer
|
||||
// }
|
||||
//
|
||||
// Variants {
|
||||
// id: visualizerBars
|
||||
//
|
||||
// model: Array.from({
|
||||
// length: Config.services.visualizerBars
|
||||
// }, (_, i) => i)
|
||||
//
|
||||
// ShapePath {
|
||||
// id: visualizerBar
|
||||
//
|
||||
// readonly property real magnitude: value * Config.dashboard.sizes.mediaVisualiserSize
|
||||
// required property int modelData
|
||||
// readonly property real value: Math.max(1e-3, Audio.cava.values[modelData])
|
||||
//
|
||||
// capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
// startX: (visualizer.barW / 2) + modelData * (visualizer.barW + visualizer.gap)
|
||||
// startY: layout.y + layout.height
|
||||
// strokeColor: visualizer.color
|
||||
// strokeWidth: visualizer.barW
|
||||
//
|
||||
// Behavior on strokeColor {
|
||||
// CAnim {
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// PathLine {
|
||||
// relativeX: 0
|
||||
// relativeY: -visualizerBar.magnitude
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Shape {
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
|
||||
Reference in New Issue
Block a user