Skip to content

Commit

Permalink
Add ZStack.frame(alignment)
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Dec 7, 2023
1 parent 065b373 commit 5741b24
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ struct IgnoredAreaView: View {
.frame(width: diameter, height: diameter)
.padding(.leading, leading)
.padding(.top, top)
.clipped()
}

let palmThresholdLeading = areaSize.width * state.point.x - (thresholdDiameter / 2)
Expand All @@ -122,14 +123,20 @@ struct IgnoredAreaView: View {
.frame(width: thresholdDiameter, height: thresholdDiameter)
.padding(.leading, palmThresholdLeading)
.padding(.top, palmThresholdTop)
.clipped()

Text("\(String(format: "%.1f", state.size))")
.padding(.leading, palmThresholdLeading)
.padding(.top, palmThresholdTop + thresholdDiameter)
.clipped()
}
}
}
.frame(width: areaSize.width, height: areaSize.height)
.frame(
width: areaSize.width,
height: areaSize.height,
alignment: .topLeading
)

VStack {
Text("Ignored")
Expand Down

0 comments on commit 5741b24

Please sign in to comment.