mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
MediaCard: Polishing the look when no mpris player is running. No mpris does not mean no audio/music.
This commit is contained in:
@@ -30,7 +30,7 @@ Item {
|
||||
antialiasing: true
|
||||
|
||||
width: root.barSlotWidth * 0.5 // Creates a small gap between bars
|
||||
height: Math.max(1, root.height * amp)
|
||||
height: root.height * amp
|
||||
x: index * root.barSlotWidth + (root.barSlotWidth * 0.25)
|
||||
y: root.height - height
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ Item {
|
||||
antialiasing: true
|
||||
|
||||
width: root.barSlotWidth * 0.8 // Creates a small gap between bars
|
||||
height: Math.max(1, barHeight)
|
||||
height: barHeight
|
||||
x: index * root.barSlotWidth + (root.barSlotWidth * 0.25)
|
||||
y: root.centerY - (barHeight / 2)
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ Item {
|
||||
|
||||
// Draw the top half of the waveform from left to right
|
||||
// Use the calculated offset for the first point
|
||||
var yOffset = Math.max(1, mirroredValues[0] * amplitude)
|
||||
var yOffset = mirroredValues[0] * amplitude
|
||||
ctx.moveTo(0, centerY - yOffset)
|
||||
|
||||
for (var i = 1; i < count; i++) {
|
||||
const x = i * stepX
|
||||
yOffset = Math.max(1, mirroredValues[i] * amplitude)
|
||||
yOffset = mirroredValues[i] * amplitude
|
||||
const y = centerY - yOffset
|
||||
ctx.lineTo(x, y)
|
||||
}
|
||||
@@ -62,7 +62,7 @@ Item {
|
||||
// Draw the bottom half of the waveform from right to left to create a closed shape
|
||||
for (var i = count - 1; i >= 0; i--) {
|
||||
const x = i * stepX
|
||||
yOffset = Math.max(1, mirroredValues[i] * amplitude)
|
||||
yOffset = mirroredValues[i] * amplitude
|
||||
const y = centerY + yOffset // Mirrored across the center
|
||||
ctx.lineTo(x, y)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user