Skip to content

Commit

Permalink
Reorganized Editor, Tab Bar, and Path Bar files and added show/hide P…
Browse files Browse the repository at this point in the history
…ath Bar setting, show/hide Utilities Area (#1420)
  • Loading branch information
austincondiff authored Sep 12, 2023
1 parent 4a8f093 commit 00da8c9
Show file tree
Hide file tree
Showing 30 changed files with 577 additions and 488 deletions.
90 changes: 57 additions & 33 deletions CodeEdit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ final class CodeEditWindowController: NSWindowController, NSToolbarDelegate, Obs
)

CommandManager.shared.addCommand(
name: "Toggle Left Sidebar",
title: "Toggle Left Sidebar",
name: "Toggle Navigator",
title: "Toggle Navigator",
id: "toggle_left_sidebar",
command: CommandClosureWrapper(closure: { self.toggleFirstPanel() })
)

CommandManager.shared.addCommand(
name: "Toggle Right Sidebar",
title: "Toggle Right Sidebar",
name: "Toggle Inspector",
title: "Toggle Inspector",
id: "toggle_right_sidebar",
command: CommandClosureWrapper(closure: { self.toggleLastPanel() })
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import SwiftUI

struct EditorPathBarView: View {

private let file: CEWorkspaceFile?
private let tappedOpenFile: (CEWorkspaceFile) -> Void

Expand Down Expand Up @@ -69,7 +68,6 @@ struct EditorPathBarView: View {
.frame(height: Self.height, alignment: .center)
.opacity(activeState == .inactive ? 0.8 : 1.0)
.grayscale(isActiveEditor ? 0.0 : 1.0)
.background(EffectView(.headerView).frame(height: Self.height))
}

private var chevron: some View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct EditorTabView: View {

@ViewBuilder var content: some View {
HStack(spacing: 0.0) {
TabDivider()
EditorTabDivider()
.opacity(
(isActive || inHoldingState)
&& tabBarStyle == .xcode ? 0.0 : 1.0
Expand Down Expand Up @@ -196,7 +196,7 @@ struct EditorTabView: View {
: (tabBarStyle == .xcode ? 0.4 : 0.55)
)
)
TabDivider()
EditorTabDivider()
.opacity(
(isActive || inHoldingState)
&& tabBarStyle == .xcode ? 0.0 : 1.0
Expand All @@ -205,7 +205,7 @@ struct EditorTabView: View {
}
.overlay(alignment: .top) {
// Only show NativeTabShadow when `tabBarStyle` is native and this tab is not active.
TabBarTopDivider()
EditorTabBarTopDivider()
.opacity(tabBarStyle == .native && !isActive ? 1 : 0)
}
.foregroundColor(
Expand Down Expand Up @@ -246,13 +246,13 @@ struct EditorTabView: View {
.animation(.easeInOut(duration: 0.08), value: isHovering)
} else {
if isFullscreen && isActive {
TabBarNativeActiveMaterial()
EditorTabBarNativeActiveMaterial()
} else {
TabBarNativeMaterial()
EditorTabBarNativeMaterial()
}
ZStack {
// Native inactive tab background dim.
TabBarNativeInactiveBackgroundColor()
EditorTabBarNativeInactiveBgColor()
// Native inactive tab hover state.
Color(nsColor: colorScheme == .dark ? .white : .black)
.opacity(isHovering ? (colorScheme == .dark ? 0.08 : 0.05) : 0.0)
Expand Down
Loading

0 comments on commit 00da8c9

Please sign in to comment.