From e67cf6cef29e862d20961f070d24f952471ff3d4 Mon Sep 17 00:00:00 2001 From: ferreo Date: Mon, 18 Nov 2024 11:16:13 +0000 Subject: [PATCH] Update changelog for v1.0.0-101pika12; use ClippingRectangle for now playing art and improve visual elements in NowPlaying QML file --- .github/release-nest-v3 | 2 +- pikabar/debian/changelog | 6 +++ .../usr/share/pikabar/widgets/NowPlaying.qml | 37 +++++-------------- 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index d8263ee..56a6051 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -2 \ No newline at end of file +1 \ No newline at end of file diff --git a/pikabar/debian/changelog b/pikabar/debian/changelog index 4f5c2a5..dd862b6 100644 --- a/pikabar/debian/changelog +++ b/pikabar/debian/changelog @@ -1,3 +1,9 @@ +pikabar (1.0.0-101pika12) pika; urgency=medium + + * Use ClippingRectangle for now playing art + + -- ferrreo Sat, 01 Oct 2022 14:50:00 +0300 + pikabar (1.0.0-101pika11) pika; urgency=medium * Fix spacings diff --git a/pikabar/usr/share/pikabar/widgets/NowPlaying.qml b/pikabar/usr/share/pikabar/widgets/NowPlaying.qml index bdb5895..fa0b086 100644 --- a/pikabar/usr/share/pikabar/widgets/NowPlaying.qml +++ b/pikabar/usr/share/pikabar/widgets/NowPlaying.qml @@ -2,6 +2,7 @@ import QtQuick import Quickshell import Quickshell.Services.Mpris import Quickshell.Io +import Quickshell.Widgets import QtQuick.Window import "root:/" @@ -79,8 +80,9 @@ BarWidget { leftMargin: 8 rightMargin: 8 } - color: "#2D2D2D" + color: "transparent" radius: 8 + visible: root.player?.playbackState === MprisPlaybackState.Playing || root.player?.playbackState === MprisPlaybackState.Paused Rectangle { id: artContainer @@ -90,26 +92,20 @@ BarWidget { anchors.leftMargin: 32 anchors.verticalCenter: parent.verticalCenter color: "transparent" - radius: 8 + radius: parent.radius - Rectangle { + ClippingRectangle { anchors.fill: parent - color: parent.color + color: "transparent" radius: parent.radius - clip: true + border.color: "#9900246b" + border.width: 2 Image { id: artImage anchors.fill: parent source: root.player?.trackArtUrl ?? "" - fillMode: Image.PreserveAspectCrop - - layer.enabled: true - layer.effect: ShaderEffect { - property real radius: artContainer.radius - property size size: Qt.size(artImage.width, artImage.height) - fragmentShader: "../roundedimage.frag.qsb" - } + fillMode: Image.PreserveAspectFit } } @@ -138,28 +134,16 @@ BarWidget { MouseArea { id: mouseArea anchors.fill: parent - hoverEnabled: root.player?.playbackState === MprisPlaybackState.Stopped || root.player?.playbackState === MprisPlaybackState.Playing || root.player?.playbackState === MprisPlaybackState.Paused + hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: root.player?.togglePlaying() } - - Rectangle { - anchors.fill: parent - color: "transparent" - border.color: "#00246b" - border.width: 2 - radius: parent.radius - antialiasing: true - smooth: true - visible: root.player?.playbackState === MprisPlaybackState.Playing || root.player?.playbackState === MprisPlaybackState.Paused - } } Item { id: titleContainer anchors.left: artContainer.right anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: 16 anchors.rightMargin: 12 height: 42 @@ -183,7 +167,6 @@ BarWidget { width: Math.min(implicitWidth, 200) anchors.left: parent.left anchors.top: parent.verticalCenter - anchors.topMargin: 2 text: root.player?.trackArtists || "" elide: Text.ElideRight color: Globals.commonStyles.textColor