Skip to content

Commit cec84ec

Browse files
committed
Moved CloseButtonStyle into CodeEditUI and renamed it OverlayButtonStyle
1 parent e010276 commit cec84ec

2 files changed

Lines changed: 0 additions & 28 deletions

File tree

CodeEdit/Features/InspectorArea/FileInspector/FileInspectorView.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ struct FileInspectorView: View {
8282
}
8383

8484
@ViewBuilder private var fileNameField: some View {
85-
@State var isValid: Bool = true
86-
8785
if let file {
8886
TextField("Name", text: $fileName)
8987
.background(
@@ -111,7 +109,6 @@ struct FileInspectorView: View {
111109
}
112110
}
113111
} else {
114-
isValid = false
115112
fileName = file.labelFileName()
116113
}
117114
}

CodeEdit/Features/Notifications/Views/NotificationBannerView.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,6 @@
77

88
import SwiftUI
99

10-
struct CloseButtonStyle: ButtonStyle {
11-
@Environment(\.colorScheme)
12-
private var colorScheme
13-
14-
func makeBody(configuration: Configuration) -> some View {
15-
configuration.label
16-
.font(.system(size: 10))
17-
.foregroundColor(.secondary)
18-
.frame(width: 20, height: 20, alignment: .center)
19-
.background(Color.primary.opacity(configuration.isPressed ? colorScheme == .dark ? 0.10 : 0.05 : 0.00))
20-
.background(.regularMaterial)
21-
.overlay(
22-
RoundedRectangle(cornerRadius: 10)
23-
.stroke(Color(nsColor: .separatorColor), lineWidth: 2)
24-
)
25-
.cornerRadius(10)
26-
.shadow(
27-
color: Color(.black.withAlphaComponent(colorScheme == .dark ? 0.2 : 0.1)),
28-
radius: 5,
29-
x: 0,
30-
y: 2
31-
)
32-
}
33-
}
34-
3510
struct NotificationBannerView: View {
3611
@Environment(\.colorScheme)
3712
private var colorScheme

0 commit comments

Comments
 (0)