Skip to content

Commit 54be86b

Browse files
committed
Add blur to the end of bar
1 parent e412f0d commit 54be86b

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

CodeEdit/Features/Editor/JumpBar/Views/EditorJumpBarView.swift

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct EditorJumpBarView: View {
2828
@State private var textWidth: CGFloat = 0
2929
@State private var containerWidth: CGFloat = 0
3030
@State private var isTruncated: Bool = false
31-
@State private var crumbWidth: CGFloat? = nil
31+
@State private var crumbWidth: CGFloat?
3232

3333
init(
3434
file: CEWorkspaceFile?,
@@ -78,6 +78,23 @@ struct EditorJumpBarView: View {
7878

7979
}
8080
}
81+
.mask(
82+
LinearGradient(
83+
gradient: Gradient(
84+
stops: crumbWidth != nil ?
85+
[
86+
.init(color: .black, location: 0),
87+
.init(color: .black, location: 0.8),
88+
.init(color: .clear, location: 1)
89+
] : [
90+
.init(color: .black, location: 0),
91+
.init(color: .black, location: 1)
92+
]
93+
),
94+
startPoint: .leading,
95+
endPoint: .trailing
96+
)
97+
)
8198
.background(
8299
GeometryReader { proxy in
83100
Color.clear

0 commit comments

Comments
 (0)