mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
ui: flip the three-cover Y split
Turn the 3-cover layout upside down so the stem runs from the centre to the top edge and the two arms open toward the bottom, leaving one boundary straight up from the centre.
This commit is contained in:
@@ -209,27 +209,27 @@ private class YRegionShape(
|
|||||||
density: Density,
|
density: Density,
|
||||||
): Outline {
|
): Outline {
|
||||||
val center = Offset(size.width / 2f, size.height / 2f)
|
val center = Offset(size.width / 2f, size.height / 2f)
|
||||||
val left = rayPoint(size, 210.0)
|
val left = rayPoint(size, 150.0)
|
||||||
val right = rayPoint(size, 330.0)
|
val right = rayPoint(size, 30.0)
|
||||||
val bottom = Offset(size.width / 2f, size.height)
|
val top = Offset(size.width / 2f, 0f)
|
||||||
val path = Path()
|
val path = Path()
|
||||||
when (region) {
|
when (region) {
|
||||||
0 -> {
|
0 -> {
|
||||||
path.moveTo(center.x, center.y)
|
path.moveTo(center.x, center.y)
|
||||||
path.lineTo(left.x, left.y)
|
path.lineTo(right.x, right.y)
|
||||||
addClockwise(path, size, left, right)
|
addClockwise(path, size, right, left)
|
||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
path.moveTo(center.x, center.y)
|
path.moveTo(center.x, center.y)
|
||||||
path.lineTo(bottom.x, bottom.y)
|
path.lineTo(left.x, left.y)
|
||||||
addClockwise(path, size, bottom, left)
|
addClockwise(path, size, left, top)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
path.moveTo(center.x, center.y)
|
path.moveTo(center.x, center.y)
|
||||||
path.lineTo(right.x, right.y)
|
path.lineTo(top.x, top.y)
|
||||||
addClockwise(path, size, right, bottom)
|
addClockwise(path, size, top, right)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
path.lineTo(center.x, center.y)
|
path.lineTo(center.x, center.y)
|
||||||
|
|||||||
Reference in New Issue
Block a user