Skip to content

Commit 6076b03

Browse files
committed
Update mask
1 parent 6734806 commit 6076b03

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,23 @@ struct EditorJumpBarComponent: View {
7272
maxWidth: isHovering || isLastItem ? nil : truncatedCrumbWidth,
7373
alignment: .leading
7474
)
75+
.mask(
76+
LinearGradient(
77+
gradient: Gradient(
78+
stops: truncatedCrumbWidth == nil ?
79+
[
80+
.init(color: .black, location: 0),
81+
.init(color: .black, location: 1)
82+
] : [
83+
.init(color: .black, location: 0),
84+
.init(color: .black, location: 0.8),
85+
.init(color: .clear, location: 1)
86+
]
87+
),
88+
startPoint: .leading,
89+
endPoint: .trailing
90+
)
91+
)
7592
.clipped()
7693
.padding(.trailing, 11)
7794
.background {

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,6 @@ struct EditorJumpBarView: View {
7979

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

0 commit comments

Comments
 (0)