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