93 lines
2.3 KiB
QML
93 lines
2.3 KiB
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell.Widgets
|
|
import QtQuick.Effects
|
|
// import playbutton.svg
|
|
|
|
Item {
|
|
id: root
|
|
Layout.fillHeight: true
|
|
implicitWidth: hi.width
|
|
|
|
visible: Player.activePlayer.canPlay()
|
|
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
onEntered: event => {
|
|
audioPopup.visible = true;
|
|
}
|
|
onExited: event => {
|
|
audioPopup.visible = false;
|
|
}
|
|
}
|
|
Image {
|
|
source: Player.activePlayer.trackArtUrl;
|
|
anchors.fill: parent
|
|
fillMode: Image.PreserveAspectCrop
|
|
|
|
layer.enabled: true
|
|
layer.effect: MultiEffect {
|
|
blur: 0.3
|
|
blurEnabled: true
|
|
}
|
|
}
|
|
// parent.aaaaa: false
|
|
RowLayout {
|
|
id: hi
|
|
Item {
|
|
implicitHeight: 30;
|
|
implicitWidth: 30;
|
|
IconImage {
|
|
implicitSize: 30;
|
|
source: "root:assets/media_player/skip_next.svg";
|
|
scale: -1
|
|
}
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onPressed: event => {
|
|
Player.activePlayer.previous();
|
|
}
|
|
}
|
|
}
|
|
Item {
|
|
implicitHeight: 30;
|
|
implicitWidth: 30;
|
|
IconImage {
|
|
implicitSize: 30;
|
|
source: !Player.activePlayer.isPlaying ? "root:/assets/media_player/playbutton.svg" : "root:/assets/media_player/pausebutton.svg";
|
|
}
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
hoverEnabled: false
|
|
onPressed: event => {
|
|
Player.activePlayer.togglePlaying();
|
|
// console.debug("" + Player.activePlayer.)
|
|
}
|
|
}
|
|
// PopupAnchor {}
|
|
}
|
|
|
|
Item {
|
|
implicitHeight: 30;
|
|
implicitWidth: 30;
|
|
IconImage {
|
|
implicitSize: 30;
|
|
source: "root:assets/media_player/skip_next.svg";
|
|
}
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onPressed: event => {
|
|
Player.activePlayer.next();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
PlayerPopup {
|
|
id: audioPopup
|
|
}
|
|
}
|