mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Cava + Visualizer: Should not depend on mpris. Its by design.
This commit is contained in:
@@ -100,7 +100,7 @@ Item {
|
||||
Loader {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
active: showVisualizer && visualizerType == "linear" && MediaService.isPlaying
|
||||
active: showVisualizer && visualizerType == "linear"
|
||||
z: 0
|
||||
|
||||
sourceComponent: LinearSpectrum {
|
||||
@@ -115,7 +115,7 @@ Item {
|
||||
Loader {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
active: showVisualizer && visualizerType == "mirrored" && MediaService.isPlaying
|
||||
active: showVisualizer && visualizerType == "mirrored"
|
||||
z: 0
|
||||
|
||||
sourceComponent: MirroredSpectrum {
|
||||
@@ -130,7 +130,7 @@ Item {
|
||||
Loader {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
active: showVisualizer && visualizerType == "wave" && MediaService.isPlaying
|
||||
active: showVisualizer && visualizerType == "wave"
|
||||
z: 0
|
||||
|
||||
sourceComponent: WaveSpectrum {
|
||||
|
||||
@@ -331,7 +331,7 @@ NBox {
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: Settings.data.audio.visualizerType == "linear" && MediaService.isPlaying
|
||||
active: Settings.data.audio.visualizerType == "linear"
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
sourceComponent: LinearSpectrum {
|
||||
@@ -344,7 +344,7 @@ NBox {
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: Settings.data.audio.visualizerType == "mirrored" && MediaService.isPlaying
|
||||
active: Settings.data.audio.visualizerType == "mirrored"
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
sourceComponent: MirroredSpectrum {
|
||||
@@ -357,7 +357,7 @@ NBox {
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: Settings.data.audio.visualizerType == "wave" && MediaService.isPlaying
|
||||
active: Settings.data.audio.visualizerType == "wave"
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
sourceComponent: WaveSpectrum {
|
||||
|
||||
@@ -199,7 +199,7 @@ Loader {
|
||||
z: 10
|
||||
|
||||
Loader {
|
||||
active: MediaService.isPlaying && Settings.data.audio.visualizerType == "linear"
|
||||
active: Settings.data.audio.visualizerType == "linear"
|
||||
anchors.centerIn: parent
|
||||
width: 160 * scaling
|
||||
height: 160 * scaling
|
||||
@@ -228,7 +228,7 @@ Loader {
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: MediaService.isPlaying && Settings.data.audio.visualizerType == "mirrored"
|
||||
active: Settings.data.audio.visualizerType == "mirrored"
|
||||
anchors.centerIn: parent
|
||||
width: 160 * scaling
|
||||
height: 160 * scaling
|
||||
@@ -258,7 +258,7 @@ Loader {
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: MediaService.isPlaying && Settings.data.audio.visualizerType == "wave"
|
||||
active: Settings.data.audio.visualizerType == "wave"
|
||||
anchors.centerIn: parent
|
||||
width: 160 * scaling
|
||||
height: 160 * scaling
|
||||
@@ -305,31 +305,6 @@ Loader {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width + 24 * scaling
|
||||
height: parent.height + 24 * scaling
|
||||
radius: width * 0.5
|
||||
color: Color.transparent
|
||||
border.color: Qt.alpha(Color.mPrimary, 0.3)
|
||||
border.width: Math.max(1, Style.borderM * scaling)
|
||||
z: -1
|
||||
visible: !MediaService.isPlaying
|
||||
SequentialAnimation on scale {
|
||||
loops: Animation.Infinite
|
||||
NumberAnimation {
|
||||
to: 1.1
|
||||
duration: 1500
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
NumberAnimation {
|
||||
to: 1.0
|
||||
duration: 1500
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NImageCircled {
|
||||
anchors.centerIn: parent
|
||||
width: 100 * scaling
|
||||
|
||||
@@ -37,7 +37,6 @@ Singleton {
|
||||
Process {
|
||||
id: process
|
||||
stdinEnabled: true
|
||||
running: MediaService.isPlaying
|
||||
command: ["cava", "-p", "/dev/stdin"]
|
||||
onExited: {
|
||||
stdinEnabled = true
|
||||
|
||||
Reference in New Issue
Block a user