Skip to content

Commit

Permalink
feat: scale widget content with panel
Browse files Browse the repository at this point in the history
- Allows smaller panel size with inline title and artist
- Constant margin on all sides makes tinted background look way better

refs: #120
  • Loading branch information
luisbocanegra authored and ccatterina committed Nov 16, 2024
1 parent d164517 commit b7c4ed1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b7c4ed1

Please sign in to comment.