audio popout inverted rounding
This commit is contained in:
@@ -15,6 +15,7 @@ Shape {
|
||||
|
||||
Modules.Background {
|
||||
wrapper: root.panels.popouts
|
||||
invertBottomRounding: wrapper.x <= 0
|
||||
|
||||
startX: wrapper.x - 8
|
||||
startY: wrapper.y
|
||||
|
||||
@@ -6,9 +6,11 @@ ShapePath {
|
||||
id: root
|
||||
|
||||
required property Wrapper wrapper
|
||||
required property bool invertBottomRounding
|
||||
readonly property real rounding: 8
|
||||
readonly property bool flatten: wrapper.height < rounding * 2
|
||||
readonly property real roundingY: flatten ? wrapper.height / 2 : rounding
|
||||
property real ibr: invertBottomRounding ? -1 : 1
|
||||
|
||||
strokeWidth: -1
|
||||
fillColor: DynamicColors.palette.m3surface
|
||||
@@ -22,15 +24,15 @@ ShapePath {
|
||||
|
||||
PathLine {
|
||||
relativeX: 0
|
||||
relativeY: root.wrapper.height - root.roundingY * 2
|
||||
relativeY: root.wrapper.height - root.roundingY - root.roundingY * root.ibr
|
||||
}
|
||||
|
||||
PathArc {
|
||||
relativeX: root.rounding
|
||||
relativeY: root.roundingY
|
||||
relativeY: root.roundingY * root.ibr
|
||||
radiusX: root.rounding
|
||||
radiusY: Math.min(root.rounding, root.wrapper.height)
|
||||
direction: PathArc.Counterclockwise
|
||||
direction: root.invertBottomRounding ? PathArc.Clockwise : PathArc.Counterclockwise
|
||||
}
|
||||
|
||||
PathLine {
|
||||
|
||||
Reference in New Issue
Block a user