Compare commits

..

2 commits

Author SHA1 Message Date
Benjamin Palko
c82163304c update lucide font and change mpris 2025-08-29 15:12:59 -04:00
Benjamin Palko
75760e2354 fix index remaining when player is destroyed 2025-08-29 13:31:56 -04:00
5 changed files with 21 additions and 20 deletions

Binary file not shown.

View file

@ -7,7 +7,6 @@ import qs.widgets
import QtQuick
import QtQuick.Layouts
import Quickshell.Services.Mpris
import Quickshell.Widgets
ColumnLayout {
id: root
@ -27,32 +26,23 @@ ColumnLayout {
RowLayout {
Layout.alignment: Qt.AlignHCenter
StyledButton {
StyledIconButton {
id: backButton
content: LucideIcon {
color: backButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent
text: Icons.skipBack
}
text: Icons.skipBack
onClicked: {
root.player.previous();
}
}
StyledButton {
StyledIconButton {
id: playPauseButton
content: LucideIcon {
color: playPauseButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent
text: root.player.isPlaying ? Icons.square : Icons.play
}
text: root.player.isPlaying ? Icons.pause : Icons.play
onClicked: {
root.player.isPlaying = !root.player.isPlaying;
}
}
StyledButton {
StyledIconButton {
id: forwardButton
content: LucideIcon {
color: forwardButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent
text: Icons.skipForward
}
text: Icons.skipForward
onClicked: {
root.player.next();
}

View file

@ -5,10 +5,14 @@ import QtQuick.Controls
RoundButton {
id: control
FontLoader {
id: loader
source: "../assets/lucide.woff"
}
font.family: loader.font.family
font.pixelSize: 16
radius: 8
font.family: Theme.lucide.font.family
font.pixelSize: 15
font.bold: true
padding: 8
HoverHandler {
@ -16,6 +20,7 @@ RoundButton {
}
contentItem: Text {
font: control.font
text: control.text
color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
Behavior on color {
@ -23,7 +28,6 @@ RoundButton {
duration: 100
}
}
font: control.font
}
background: Rectangle {

View file

@ -19,6 +19,7 @@ Singleton {
property string gpu: "\u{E66f}"
property string hardDrive: "\u{E0f1}"
property string memoryStick: "\u{E44a}"
property string pause: "\u{E132}"
property string play: "\u{E140}"
property string search: "\u{E155}"
property string skipBack: "\u{E163}"

View file

@ -16,6 +16,12 @@ Singleton {
property int currentIndex: 0
}
onPlayersChanged: {
if (!active) {
properties.currentIndex = 0;
}
}
function nextPlayer() {
if (players.length == 0) {
return;