From b7c4ed1ff6dd5d224354c3aa05289f8b2612e541 Mon Sep 17 00:00:00 2001 From: Luis Bocanegra Date: Fri, 15 Nov 2024 20:57:23 -0600 Subject: [PATCH] feat: scale widget content with panel - Allows smaller panel size with inline title and artist - Constant margin on all sides makes tinted background look way better refs: https://github.com/ccatterina/plasmusic-toolbar/issues/120 --- src/contents/ui/main.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml index feeff16..ee0d6d3 100644 --- a/src/contents/ui/main.qml +++ b/src/contents/ui/main.qml @@ -48,8 +48,8 @@ PlasmoidItem { compactRepresentation: Item { id: compact - Layout.preferredWidth: grid.implicitWidth + Kirigami.Units.smallSpacing * 2 - Layout.preferredHeight: grid.implicitHeight + Kirigami.Units.smallSpacing * 2 + Layout.preferredWidth: grid.implicitWidth + (horizontal ? lengthMargin : 0) + Layout.preferredHeight: grid.implicitHeight + (horizontal ? 0 : lengthMargin) Layout.fillHeight: horizontal Layout.fillWidth: !horizontal readonly property bool colorsFromAlbumCover: plasmoid.configuration.colorsFromAlbumCover @@ -131,7 +131,7 @@ PlasmoidItem { rowSpacing: Kirigami.Units.smallSpacing columns: horizontal ? grid.children.length : 1 rows: horizontal ? 1 : grid.children.length - anchors.fill: parent + anchors.centerIn: parent PanelIcon { size: compact.controlsSize