Skip to content

Commit 007fba4

Browse files
committed
Adjust view geometry
- Remove the min size on ContentView - Use navigationSplitViewColumnWidth to set a width for both sidebar and detail view. This enables the inspector and the room list to intelligently collapse as the overall window resizes and eliminates the view content clipping that occurred.
1 parent c808bd1 commit 007fba4

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Relay/ContentView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ struct ContentView: View {
5656
}
5757
}
5858
.relayErrorAlert()
59-
.frame(minWidth: 700, minHeight: 500)
6059
}
6160
}
6261

Relay/Views/MainView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ struct MainView: View { // swiftlint:disable:this type_body_length
102102
private var navigationContent: some View {
103103
NavigationSplitView(columnVisibility: $columnVisibility) {
104104
sidebarColumn
105+
.navigationSplitViewColumnWidth(min: 160, ideal: 300, max: 360)
105106
} detail: {
106107
detailContent
108+
.navigationSplitViewColumnWidth(min: 440, ideal: 540)
109+
.frame(minHeight: 340)
107110
}
108111
.searchable(text: $searchModel.searchText, placement: .sidebar, prompt: "Search\u{2026}")
109112
.searchFocused($isSearchFocused)
@@ -248,7 +251,6 @@ struct MainView: View { // swiftlint:disable:this type_body_length
248251
spaceRailView
249252
}
250253
}
251-
.navigationSplitViewColumnWidth(min: 160, ideal: 300, max: 360)
252254
}
253255

254256
// MARK: - Detail

0 commit comments

Comments
 (0)