diff --git a/Modules/Bar/Bar.qml b/Modules/Bar/Bar.qml index cc1b5be..2959a5e 100644 --- a/Modules/Bar/Bar.qml +++ b/Modules/Bar/Bar.qml @@ -52,13 +52,9 @@ Variants { anchors.verticalCenter: parent.verticalCenter spacing: Style.marginSmall * scaling - // Debug show monitor name - // NText { - // text: screen.name - // anchors.verticalCenter: parent.verticalCenter - // font.weight: Style.fontWeightBold - // } SystemMonitor {} + + MediaMini {} } // Center diff --git a/Modules/Bar/MediaMini.qml b/Modules/Bar/MediaMini.qml new file mode 100644 index 0000000..2a54498 --- /dev/null +++ b/Modules/Bar/MediaMini.qml @@ -0,0 +1,36 @@ +import QtQuick +import QtQuick.Layouts +import qs.Services +import qs.Widgets + +Item { + id: root + + width: visible ? mediaRow.width : 0 + height: Style.barHeight * scaling + visible: Settings.data.bar.showMedia && (MediaPlayer.canPlay || MediaPlayer.canPause) + + RowLayout { + id: mediaRow + height: parent.height + spacing: Style.spacingTiniest * scaling + + NIconButton { + icon: MediaPlayer.isPlaying ? "pause" : "play_arrow" + tooltipText: "Play/pause media" + sizeMultiplier: 0.8 + showBorder: false + onClicked: MediaPlayer.playPause() + } + + // Track info + NText { + text: MediaPlayer.trackTitle + " - " + MediaPlayer.trackArtist + color: Colors.mOnSurface + font.pointSize: Style.fontSizeSmall * scaling + elide: Text.ElideRight + Layout.maximumWidth: 200 * scaling + Layout.alignment: Qt.AlignVCenter + } + } +} diff --git a/Modules/SidePanel/Cards/MediaCard.qml b/Modules/SidePanel/Cards/MediaCard.qml index 9437c62..f2bd12e 100644 --- a/Modules/SidePanel/Cards/MediaCard.qml +++ b/Modules/SidePanel/Cards/MediaCard.qml @@ -172,7 +172,7 @@ NBox { anchors.fill: parent anchors.margins: Style.marginTiny * scaling imagePath: MediaPlayer.trackArtUrl - fallbackIcon: "image" + fallbackIcon: "music_note" borderColor: Colors.mOutline borderWidth: Math.max(1, Style.borderThin * scaling) imageRadius: width * 0.5