From 1bcc306fccdaa1c5b6458e0e16c8f75d73cf789d Mon Sep 17 00:00:00 2001 From: Jordan Baird Date: Fri, 4 Oct 2024 21:41:15 -0600 Subject: [PATCH] Misc interface changes --- Ice/Settings/SettingsView.swift | 32 +++++++++++++++++++++---------- Ice/Settings/SettingsWindow.swift | 1 + 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Ice/Settings/SettingsView.swift b/Ice/Settings/SettingsView.swift index 128d6ed0..2f5fda41 100644 --- a/Ice/Settings/SettingsView.swift +++ b/Ice/Settings/SettingsView.swift @@ -11,13 +11,31 @@ 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 @@ -25,12 +43,6 @@ struct SettingsView: View { detailView } .navigationTitle(navigationState.settingsNavigationIdentifier.localized) - .frame(minWidth: 825, minHeight: 500) - .background { - VisualEffectView(material: .contentBackground, blendingMode: .behindWindow) - .opacity(0.25) - .blendMode(.softLight) - } } @ViewBuilder @@ -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 { diff --git a/Ice/Settings/SettingsWindow.swift b/Ice/Settings/SettingsWindow.swift index 2ad7e8fa..b8bc94b0 100644 --- a/Ice/Settings/SettingsWindow.swift +++ b/Ice/Settings/SettingsWindow.swift @@ -17,6 +17,7 @@ struct SettingsWindow: Scene { } appState.assignSettingsWindow(window) } + .frame(minWidth: 825, minHeight: 500) } .commandsRemoved() .windowResizability(.contentSize)