Compare commits
2 commits
d78b9b275f
...
c82163304c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c82163304c | ||
|
|
75760e2354 |
5 changed files with 21 additions and 20 deletions
Binary file not shown.
|
|
@ -7,7 +7,6 @@ import qs.widgets
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Quickshell.Services.Mpris
|
import Quickshell.Services.Mpris
|
||||||
import Quickshell.Widgets
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -27,32 +26,23 @@ ColumnLayout {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
StyledButton {
|
StyledIconButton {
|
||||||
id: backButton
|
id: backButton
|
||||||
content: LucideIcon {
|
text: Icons.skipBack
|
||||||
color: backButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent
|
|
||||||
text: Icons.skipBack
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.player.previous();
|
root.player.previous();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StyledButton {
|
StyledIconButton {
|
||||||
id: playPauseButton
|
id: playPauseButton
|
||||||
content: LucideIcon {
|
text: root.player.isPlaying ? Icons.pause : Icons.play
|
||||||
color: playPauseButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent
|
|
||||||
text: root.player.isPlaying ? Icons.square : Icons.play
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.player.isPlaying = !root.player.isPlaying;
|
root.player.isPlaying = !root.player.isPlaying;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StyledButton {
|
StyledIconButton {
|
||||||
id: forwardButton
|
id: forwardButton
|
||||||
content: LucideIcon {
|
text: Icons.skipForward
|
||||||
color: forwardButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent
|
|
||||||
text: Icons.skipForward
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.player.next();
|
root.player.next();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,14 @@ import QtQuick.Controls
|
||||||
RoundButton {
|
RoundButton {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
|
FontLoader {
|
||||||
|
id: loader
|
||||||
|
source: "../assets/lucide.woff"
|
||||||
|
}
|
||||||
|
|
||||||
|
font.family: loader.font.family
|
||||||
|
font.pixelSize: 16
|
||||||
radius: 8
|
radius: 8
|
||||||
font.family: Theme.lucide.font.family
|
|
||||||
font.pixelSize: 15
|
|
||||||
font.bold: true
|
|
||||||
padding: 8
|
padding: 8
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
|
@ -16,6 +20,7 @@ RoundButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
font: control.font
|
||||||
text: control.text
|
text: control.text
|
||||||
color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
|
color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
|
|
@ -23,7 +28,6 @@ RoundButton {
|
||||||
duration: 100
|
duration: 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
font: control.font
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ Singleton {
|
||||||
property string gpu: "\u{E66f}"
|
property string gpu: "\u{E66f}"
|
||||||
property string hardDrive: "\u{E0f1}"
|
property string hardDrive: "\u{E0f1}"
|
||||||
property string memoryStick: "\u{E44a}"
|
property string memoryStick: "\u{E44a}"
|
||||||
|
property string pause: "\u{E132}"
|
||||||
property string play: "\u{E140}"
|
property string play: "\u{E140}"
|
||||||
property string search: "\u{E155}"
|
property string search: "\u{E155}"
|
||||||
property string skipBack: "\u{E163}"
|
property string skipBack: "\u{E163}"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,12 @@ Singleton {
|
||||||
property int currentIndex: 0
|
property int currentIndex: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onPlayersChanged: {
|
||||||
|
if (!active) {
|
||||||
|
properties.currentIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function nextPlayer() {
|
function nextPlayer() {
|
||||||
if (players.length == 0) {
|
if (players.length == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue