popouts: fix bottom glitch

Fix flicker when popout hits bottom
Also animate bottom rounding change
This commit is contained in:
2 * r + 2 * t 2025-06-07 18:06:45 +10:00
parent 2c11f0e783
commit d76587c2db
2 changed files with 13 additions and 4 deletions

View file

@ -11,6 +11,7 @@ ShapePath {
readonly property real rounding: BorderConfig.rounding
readonly property bool flatten: wrapper.width < rounding * 2
readonly property real roundingX: flatten ? wrapper.width / 2 : rounding
property real ibr: invertBottomRounding ? -1 : 1
strokeWidth: -1
fillColor: BorderConfig.colour
@ -37,14 +38,14 @@ ShapePath {
relativeY: root.wrapper.height - root.rounding * 2
}
PathArc {
relativeX: root.invertBottomRounding ? root.roundingX : -root.roundingX
relativeX: -root.roundingX * root.ibr
relativeY: root.rounding
radiusX: Math.min(root.rounding, root.wrapper.width)
radiusY: root.rounding
direction: root.invertBottomRounding ? PathArc.Counterclockwise : PathArc.Clockwise
direction: root.ibr < 0 ? PathArc.Counterclockwise : PathArc.Clockwise
}
PathLine {
relativeX: -(root.wrapper.width - root.roundingX * (root.invertBottomRounding ? 0 : 2))
relativeX: -(root.wrapper.width - root.roundingX - root.roundingX * root.ibr)
relativeY: 0
}
PathArc {
@ -62,4 +63,12 @@ ShapePath {
easing.bezierCurve: Appearance.anim.curves.standard
}
}
Behavior on ibr {
NumberAnimation {
duration: Appearance.anim.durations.normal
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.standard
}
}
}

View file

@ -58,7 +58,7 @@ Shape {
BarPopouts.Background {
wrapper: panels.popouts
invertBottomRounding: wrapper.y + wrapper.height >= root.height
invertBottomRounding: wrapper.y + wrapper.height + 1 >= root.height
startX: 0
startY: wrapper.y - rounding