diff --git a/assets/lucide.woff b/assets/lucide.woff index e40924a..760415a 100644 Binary files a/assets/lucide.woff and b/assets/lucide.woff differ diff --git a/components/MprisController.qml b/components/MprisController.qml index 6443314..9303bed 100644 --- a/components/MprisController.qml +++ b/components/MprisController.qml @@ -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(); } diff --git a/components/StyledIconButton.qml b/components/StyledIconButton.qml index 88caaf9..23319ae 100644 --- a/components/StyledIconButton.qml +++ b/components/StyledIconButton.qml @@ -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 { diff --git a/constants/Icons.qml b/constants/Icons.qml index d00c970..7caf3e3 100644 --- a/constants/Icons.qml +++ b/constants/Icons.qml @@ -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}"