fix: disable corner fill for dash lyrics info

Also fix bug where it would get stuck to the top left
This commit is contained in:
2 * r + 2 * t 2026-05-08 03:14:35 +10:00
parent 71386f008d
commit a4163d2c7c

View file

@ -12,14 +12,15 @@ Item {
property bool open property bool open
readonly property real padding: Tokens.padding.large readonly property real padding: Tokens.padding.large
implicitWidth: btn.implicitWidth implicitWidth: btn.implicitWidth * 0.9
implicitHeight: btn.implicitHeight implicitHeight: btn.implicitHeight * 0.9
BlobGroup { BlobGroup {
id: blobGroup id: blobGroup
color: Colours.palette.m3surfaceContainerHighest color: Colours.palette.m3surfaceContainerHighest
smoothing: 12 smoothing: 16
cornerFill: false
Behavior on color { Behavior on color {
CAnim {} CAnim {}
@ -32,7 +33,7 @@ Item {
anchors.fill: parent anchors.fill: parent
anchors.margins: !btn.pressed && btn.containsMouse ? -Tokens.padding.extraSmall : 0 anchors.margins: !btn.pressed && btn.containsMouse ? -Tokens.padding.extraSmall : 0
group: blobGroup group: blobGroup
radius: Tokens.rounding.large radius: Tokens.rounding.medium
Behavior on anchors.margins { Behavior on anchors.margins {
Anim {} Anim {}
@ -42,13 +43,14 @@ Item {
BlobRect { BlobRect {
id: rect id: rect
x: (btnRect.width - implicitWidth) * 0.7 anchors.right: parent.right
y: (btnRect.height - implicitHeight) * 0.3 anchors.top: parent.top
implicitWidth: btnRect.width * 0.4
implicitHeight: btnRect.height * 0.4 implicitWidth: parent.width
implicitHeight: parent.height
group: blobGroup group: blobGroup
radius: Tokens.rounding.large radius: Tokens.rounding.medium
deformScale: 0.00001 deformScale: 0.00001
states: State { states: State {
@ -56,8 +58,8 @@ Item {
when: root.open when: root.open
PropertyChanges { PropertyChanges {
rect.x: -(layout.implicitWidth + root.padding + root.Tokens.padding.medium) rect.anchors.rightMargin: root.width - root.Tokens.spacing.small
rect.y: -root.Tokens.padding.medium rect.anchors.topMargin: -root.Tokens.padding.medium
rect.implicitWidth: Math.max(layout.implicitWidth, placeholder.implicitWidth) + root.padding * 2 rect.implicitWidth: Math.max(layout.implicitWidth, placeholder.implicitWidth) + root.padding * 2
rect.implicitHeight: Math.max(layout.implicitHeight, placeholder.implicitHeight) + root.padding * 2 rect.implicitHeight: Math.max(layout.implicitHeight, placeholder.implicitHeight) + root.padding * 2
content.opacity: 1 content.opacity: 1
@ -66,10 +68,10 @@ Item {
transitions: Transition { transitions: Transition {
Anim { Anim {
properties: "x,implicitWidth" properties: "rightMargin,implicitWidth"
} }
Anim { Anim {
properties: "y,implicitHeight" properties: "topMargin,implicitHeight"
easing: root.Tokens.anim.expressiveFastSpatial easing: root.Tokens.anim.expressiveFastSpatial
} }
Anim { Anim {
@ -78,27 +80,11 @@ Item {
} }
} }
Behavior on x {
enabled: root.open
Anim {}
}
Behavior on y {
enabled: root.open
Anim {}
}
Behavior on implicitWidth { Behavior on implicitWidth {
enabled: root.open
Anim {} Anim {}
} }
Behavior on implicitHeight { Behavior on implicitHeight {
enabled: root.open
Anim {} Anim {}
} }
@ -204,6 +190,7 @@ Item {
MouseArea { MouseArea {
id: btn id: btn
anchors.centerIn: parent
implicitWidth: implicitHeight implicitWidth: implicitHeight
implicitHeight: icon.implicitHeight + Tokens.padding.extraSmall * 2 implicitHeight: icon.implicitHeight + Tokens.padding.extraSmall * 2
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor