Skip to content

Commit 01e29b3

Browse files
remove butt line cap
1 parent 9f55031 commit 01e29b3

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Examples/DemosApp/DemosApp/ComponentsPreview/PreviewPages/CircularProgressPreview.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ struct CircularProgressPreview: View {
3838
ComponentColorPicker(selection: self.$model.color)
3939
CaptionFontPicker(selection: self.$model.font)
4040
Picker("Line Cap", selection: self.$model.lineCap) {
41-
Text("Butt").tag(CircularProgressVM.LineCap.butt)
4241
Text("Rounded").tag(CircularProgressVM.LineCap.rounded)
4342
Text("Square").tag(CircularProgressVM.LineCap.square)
4443
}

Sources/ComponentsKit/Components/CircularProgress/Models/CircularProgressLineCap.swift

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ import UIKit
44
extension CircularProgressVM {
55
/// Defines the style of line endings.
66
public enum LineCap {
7-
/// The line ends exactly at the endpoint with a flat edge.
8-
case butt
97
/// The line ends with a semicircular arc that extends beyond the endpoint, creating a rounded appearance.
108
case rounded
11-
/// The line ends with a square cap that extends beyond the endpoint by half the line width, similar to `butt` but with a protruding end.
9+
/// The line ends exactly at the endpoint with a flat edge.
1210
case square
1311
}
1412
}
@@ -18,12 +16,10 @@ extension CircularProgressVM {
1816
extension CircularProgressVM.LineCap {
1917
var shapeLayerLineCap: CAShapeLayerLineCap {
2018
switch self {
21-
case .butt:
22-
return .butt
2319
case .rounded:
2420
return .round
2521
case .square:
26-
return .square
22+
return .butt
2723
}
2824
}
2925
}
@@ -33,12 +29,10 @@ extension CircularProgressVM.LineCap {
3329
extension CircularProgressVM.LineCap {
3430
var cgLineCap: CGLineCap {
3531
switch self {
36-
case .butt:
37-
return .butt
3832
case .rounded:
3933
return .round
4034
case .square:
41-
return .square
35+
return .butt
4236
}
4337
}
4438
}

0 commit comments

Comments
 (0)