Skip to content

Commit

Permalink
Misc interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbaird committed Oct 5, 2024
1 parent 3f08f0b commit 1bcc306
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
32 changes: 22 additions & 10 deletions Ice/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,38 @@ struct SettingsView: View {

private var sidebarWidth: CGFloat {
switch sidebarRowSize {
case .small: 206
case .small: 190
case .medium: 210
case .large: 214
case .large: 230
@unknown default: 210
}
}

private var sidebarItemHeight: CGFloat {
switch sidebarRowSize {
case .small: 26
case .medium: 32
case .large: 34
@unknown default: 32
}
}

private var sidebarItemFontSize: CGFloat {
switch sidebarRowSize {
case .small: 13
case .medium: 15
case .large: 16
@unknown default: 15
}
}

var body: some View {
NavigationSplitView {
sidebar
} detail: {
detailView
}
.navigationTitle(navigationState.settingsNavigationIdentifier.localized)
.frame(minWidth: 825, minHeight: 500)
.background {
VisualEffectView(material: .contentBackground, blendingMode: .behindWindow)
.opacity(0.25)
.blendMode(.softLight)
}
}

@ViewBuilder
Expand Down Expand Up @@ -77,12 +89,12 @@ struct SettingsView: View {
private func sidebarItem(for identifier: SettingsNavigationIdentifier) -> some View {
Label {
Text(identifier.localized)
.font(.title3)
.font(.system(size: sidebarItemFontSize))
.padding(.leading, 2)
} icon: {
icon(for: identifier).view
}
.frame(height: 32)
.frame(height: sidebarItemHeight)
}

private func icon(for identifier: SettingsNavigationIdentifier) -> IconResource {
Expand Down
1 change: 1 addition & 0 deletions Ice/Settings/SettingsWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct SettingsWindow: Scene {
}
appState.assignSettingsWindow(window)
}
.frame(minWidth: 825, minHeight: 500)
}
.commandsRemoved()
.windowResizability(.contentSize)
Expand Down

0 comments on commit 1bcc306

Please sign in to comment.