Skip to content

Commit ef94716

Browse files
committed
Fix Tab Bar being Non-Interactive
1 parent 0e12166 commit ef94716

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

CodeEdit/Features/Editor/Views/EditorAreaView.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ struct EditorAreaView: View {
4141
}
4242
}
4343

44-
var editorInsetAmount: Double {
45-
let tabBarHeight = shouldShowTabBar ? (EditorTabBarView.height + 1) : 0
46-
let jumpBarHeight = showEditorJumpBar ? (EditorJumpBarView.height + 1) : 0
47-
return tabBarHeight + jumpBarHeight
48-
}
44+
// var editorInsetAmount: Double {
45+
// let tabBarHeight = shouldShowTabBar ? (EditorTabBarView.height + 1) : 0
46+
// let jumpBarHeight = showEditorJumpBar ? (EditorJumpBarView.height + 1) : 0
47+
// return tabBarHeight + jumpBarHeight
48+
// }
4949

5050
VStack {
5151
if let selected = editor.selectedTab {
@@ -55,9 +55,9 @@ struct EditorAreaView: View {
5555
textViewCoordinators: [selected.rangeTranslator].compactMap({ $0 })
5656
)
5757
.focusedObject(editor)
58-
.transformEnvironment(\.edgeInsets) { insets in
59-
insets.top += editorInsetAmount
60-
}
58+
// .transformEnvironment(\.edgeInsets) { insets in
59+
// insets.top += editorInsetAmount
60+
// }
6161
.opacity(dimEditorsWithoutFocus && editor != editorManager.activeEditor ? 0.5 : 1)
6262
} else {
6363
LoadingFileView(selected.file.name)
@@ -73,14 +73,14 @@ struct EditorAreaView: View {
7373

7474
} else {
7575
CEContentUnavailableView("No Editor")
76-
.padding(.top, editorInsetAmount)
76+
// .padding(.top, editorInsetAmount)
7777
.onTapGesture {
7878
editorManager.activeEditor = editor
7979
}
8080
}
8181
}
8282
.frame(maxWidth: .infinity, maxHeight: .infinity)
83-
.ignoresSafeArea(.all)
83+
// .ignoresSafeArea(.all)
8484
.safeAreaInset(edge: .top, spacing: 0) {
8585
VStack(spacing: 0) {
8686
if shouldShowTabBar {

CodeEdit/Features/Editor/Views/EditorLayoutView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ struct EditorLayoutView: View {
3030
.transformEnvironment(\.edgeInsets) { insets in
3131
switch isAtEdge {
3232
case .all:
33-
insets.top += toolbarHeight
33+
// insets.top += toolbarHeight
3434
insets.bottom += StatusBarView.height + 5
3535
case .top:
36-
insets.top += toolbarHeight
36+
// insets.top += toolbarHeight
37+
break
3738
case .bottom:
3839
insets.bottom += StatusBarView.height + 5
3940
default:

CodeEdit/WorkspaceView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct WorkspaceView: View {
8484
}
8585
.accessibilityHidden(true)
8686
}
87-
.edgesIgnoringSafeArea(.top)
87+
// .ignoresSafeArea(edges: .top)
8888
.frame(maxWidth: .infinity, maxHeight: .infinity)
8989
.overlay(alignment: .top) {
9090
ZStack(alignment: .top) {

0 commit comments

Comments
 (0)