diff --git a/assets/lucide.woff b/assets/lucide.woff index 760415a..e40924a 100644 Binary files a/assets/lucide.woff and b/assets/lucide.woff differ diff --git a/components/MprisController.qml b/components/MprisController.qml index 9303bed..6443314 100644 --- a/components/MprisController.qml +++ b/components/MprisController.qml @@ -7,6 +7,7 @@ import qs.widgets import QtQuick import QtQuick.Layouts import Quickshell.Services.Mpris +import Quickshell.Widgets ColumnLayout { id: root @@ -26,23 +27,32 @@ ColumnLayout { RowLayout { Layout.alignment: Qt.AlignHCenter - StyledIconButton { + StyledButton { id: backButton - text: Icons.skipBack + content: LucideIcon { + color: backButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent + text: Icons.skipBack + } onClicked: { root.player.previous(); } } - StyledIconButton { + StyledButton { id: playPauseButton - text: root.player.isPlaying ? Icons.pause : Icons.play + content: LucideIcon { + color: playPauseButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent + text: root.player.isPlaying ? Icons.square : Icons.play + } onClicked: { root.player.isPlaying = !root.player.isPlaying; } } - StyledIconButton { + StyledButton { id: forwardButton - text: Icons.skipForward + content: LucideIcon { + color: forwardButton.containsMouse ? Theme.palette.primarycontent : Theme.palette.basecontent + text: Icons.skipForward + } onClicked: { root.player.next(); } diff --git a/components/StyledIconButton.qml b/components/StyledIconButton.qml index 23319ae..88caaf9 100644 --- a/components/StyledIconButton.qml +++ b/components/StyledIconButton.qml @@ -5,14 +5,10 @@ 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 { @@ -20,7 +16,6 @@ RoundButton { } contentItem: Text { - font: control.font text: control.text color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent Behavior on color { @@ -28,6 +23,7 @@ RoundButton { duration: 100 } } + font: control.font } background: Rectangle { diff --git a/constants/Icons.qml b/constants/Icons.qml index 7caf3e3..d00c970 100644 --- a/constants/Icons.qml +++ b/constants/Icons.qml @@ -19,7 +19,6 @@ 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}" diff --git a/services/Mpris.qml b/services/Mpris.qml index 2abc69d..585bbd0 100644 --- a/services/Mpris.qml +++ b/services/Mpris.qml @@ -16,12 +16,6 @@ Singleton { property int currentIndex: 0 } - onPlayersChanged: { - if (!active) { - properties.currentIndex = 0; - } - } - function nextPlayer() { if (players.length == 0) { return;