style(settings): grid the short cards, keep the tall ones stacked
Appearance and Account are both short — a LazyVGrid lets them sit side-by-side when the window's wide enough instead of each wasting a full-width row. Offline & Sync and About stay full-width: pairing those with anything in the same grid row looked worse (very uneven row heights) than just stacking them. Also widened the content column (640 -> 900) so the grid actually has room to go two-up.
This commit is contained in:
@@ -2,11 +2,11 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
import OutlineKit
|
import OutlineKit
|
||||||
|
|
||||||
/// Full-page Settings — rendered as a `RootView`-level overlay (see
|
/// Full-page Settings — swapped into `ContentView_macOS`'s detail pane (see
|
||||||
/// `AppNavigation`), not a separate popup window. Replaces the old
|
/// `AppNavigation`), alongside the sidebar, not a separate popup window.
|
||||||
/// `Settings {}` scene / `PreferencesView` and folds in what used to be the
|
/// Replaces the old `Settings {}` scene / `PreferencesView` and folds in
|
||||||
/// standalone "About Outpost" window's content too, so everything about the
|
/// what used to be the standalone "About Outpost" window's content too, so
|
||||||
/// app lives in one place.
|
/// everything about the app lives in one place.
|
||||||
struct SettingsView: View {
|
struct SettingsView: View {
|
||||||
let onDone: () -> Void
|
let onDone: () -> Void
|
||||||
|
|
||||||
@@ -28,13 +28,21 @@ struct SettingsView: View {
|
|||||||
Divider()
|
Divider()
|
||||||
ScrollView {
|
ScrollView {
|
||||||
VStack(alignment: .leading, spacing: 20) {
|
VStack(alignment: .leading, spacing: 20) {
|
||||||
|
// Appearance and Account are short — let them sit
|
||||||
|
// side-by-side when there's room instead of each
|
||||||
|
// claiming a full-width row on their own. Offline & Sync
|
||||||
|
// and About stay full-width, own row each: both are
|
||||||
|
// taller and visibly uneven height content, paired with
|
||||||
|
// an adaptive grid, looks worse than just stacking.
|
||||||
|
LazyVGrid(columns: [GridItem(.adaptive(minimum: 260), spacing: 20)], alignment: .leading, spacing: 20) {
|
||||||
appearanceSection
|
appearanceSection
|
||||||
accountSection
|
accountSection
|
||||||
|
}
|
||||||
offlineSyncSection
|
offlineSyncSection
|
||||||
aboutSection
|
aboutSection
|
||||||
}
|
}
|
||||||
.padding(24)
|
.padding(24)
|
||||||
.frame(maxWidth: 640)
|
.frame(maxWidth: 900)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user