Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions modules/utilities/cards/MediaList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,15 @@ ColumnLayout {
width: bigCol.implicitWidth
height: bigCol.implicitHeight
x: Math.max(0, (phWrap.width - width) / 2)
// Desired center based on TARGET height; then clamped by CURRENT viewport height
property real desiredCenter: Math.max(0, (pseudoContainer.height - height) / 2)

// Desired center based on CURRENT animated height to prevent overflow during animation
property real desiredCenter: Math.max(0, (viewport.animatedHeight - height) / 2)

y: phWrap.clampedYFor(big, viewport.expandedTarget ? big.desiredCenter : 0)

Behavior on opacity { Anim { duration: heightAnim.duration } }
Behavior on scale { Anim { duration: heightAnim.duration } }
Behavior on y { Anim { duration: heightAnim.duration; easing: heightAnim.easing } }
Behavior on y { Anim { duration: heightAnim.duration * 0.6; easing: heightAnim.easing } }

Column {
id: bigCol
Expand Down Expand Up @@ -258,12 +260,15 @@ ColumnLayout {
width: smallRow.implicitWidth
height: smallRow.implicitHeight
x: Math.max(0, (phWrap.width - width) / 2)
property real desiredCenter: Math.max(0, (pseudoContainer.height - height) / 2)
y: phWrap.clampedYFor(small, viewport.expandedTarget ? 0 : small.desiredCenter)

property real desiredCenter: Math.max(0, (viewport.animatedHeight - height) / 2)
y: phWrap.clampedYFor(small, viewport.expandedTarget ? small.desiredCenter : small.desiredCenter)

Behavior on opacity { Anim { duration: heightAnim.duration } }
Behavior on scale { Anim { duration: heightAnim.duration } }
Behavior on y { Anim { duration: heightAnim.duration; easing: heightAnim.easing } }
// Remove Y animation for small variant to eliminate stagger during collapse
// Behavior on y { Anim { duration: heightAnim.duration * 0.6; easing: heightAnim.easing } }


Row {
id: smallRow
Expand Down