diff --git a/Application/Presentation/HomeTab/Sources/Record/GoalDetail/GoalDetailView.swift b/Application/Presentation/HomeTab/Sources/Record/GoalDetail/GoalDetailView.swift index 2e832efb..0fd016e3 100644 --- a/Application/Presentation/HomeTab/Sources/Record/GoalDetail/GoalDetailView.swift +++ b/Application/Presentation/HomeTab/Sources/Record/GoalDetail/GoalDetailView.swift @@ -43,6 +43,9 @@ public struct GoalDetailView: View { recordSection recordActionButton } + // 사이드바가 있으면 칸 가운데 목록 폭으로 모으고 스크롤 영역은 칸 전체 폭 유지 + .frame(maxWidth: usesDesktopLayout ? 600 * AdaptiveSize.boardScale : .infinity) + .frame(maxWidth: .infinity) } .safeAreaInset(edge: .top, spacing: 0) { topBar } .background(Color.background.ignoresSafeArea()) diff --git a/Application/Presentation/HomeTab/Sources/Search/SearchView.swift b/Application/Presentation/HomeTab/Sources/Search/SearchView.swift index bde13f8d..a42e556c 100644 --- a/Application/Presentation/HomeTab/Sources/Search/SearchView.swift +++ b/Application/Presentation/HomeTab/Sources/Search/SearchView.swift @@ -14,7 +14,6 @@ struct SearchView: View { @Environment(\.isiOSAppOnMac) private var isiOSAppOnMac @Environment(\.usesDesktopLayout) private var usesDesktopLayout @Environment(\.windowControlsInset) private var windowControlsInset - @Environment(\.readableContentWidth) private var readableContentWidth @Environment(\.deviceType) private var deviceType @Bindable private var store: StoreOf // 좁은 창에서 쌓아 연 결과 상세의 편집을 Mac 편집 창과 같은 경로로 전달 @@ -53,7 +52,8 @@ struct SearchView: View { SearchResults(store: store, onSelectTodo: onSelectTodo) } } - .frame(maxWidth: readableContentWidth) + // 사이드바가 있으면 칸 가운데 목록 폭으로 모으고 스크롤 영역은 칸 전체 폭 유지 + .frame(maxWidth: usesDesktopLayout ? 600 * AdaptiveSize.boardScale : .infinity) .frame(maxWidth: .infinity) } .safeAreaInset(edge: .top, spacing: 0) { @@ -62,7 +62,7 @@ struct SearchView: View { SearchField(store: store) .padding(.horizontal, isiOSAppOnMac ? 14 * AdaptiveSize.boardScale : 16) .padding(.vertical, isiOSAppOnMac ? 4 * AdaptiveSize.boardScale : 8) - .frame(maxWidth: readableContentWidth) + .frame(maxWidth: usesDesktopLayout ? 600 * AdaptiveSize.boardScale : .infinity) } .background(Color.background) } diff --git a/Application/Presentation/HomeTab/Sources/Todo/List/TodoListView.swift b/Application/Presentation/HomeTab/Sources/Todo/List/TodoListView.swift index 37b6e240..358fa1ff 100644 --- a/Application/Presentation/HomeTab/Sources/Todo/List/TodoListView.swift +++ b/Application/Presentation/HomeTab/Sources/Todo/List/TodoListView.swift @@ -109,7 +109,6 @@ private struct TodoListContent: View { @Environment(\.usesDesktopLayout) private var usesDesktopLayout @Environment(\.usesPaneLayout) private var usesPaneLayout @Environment(\.windowControlsInset) private var windowControlsInset - @Environment(\.readableContentWidth) private var readableContentWidth @Environment(\.deviceType) private var deviceType let store: StoreOf let onSelectTodo: (String) -> Void @@ -233,7 +232,8 @@ private struct TodoListContent: View { .clipShape(.rect) // Mac은 둥근 선택·마우스 표시가 칸 가장자리에 붙지 않도록 좌우 여백 표시 .padding(.horizontal, isiOSAppOnMac ? 16 : 0) - .frame(maxWidth: readableContentWidth) + // 사이드바가 있으면 칸 가운데 목록 폭으로 모으고 스크롤 영역은 칸 전체 폭 유지 + .frame(maxWidth: usesDesktopLayout ? 600 * AdaptiveSize.boardScale : .infinity) .frame(maxWidth: .infinity) } } @@ -299,8 +299,8 @@ private func presentDeleteTodoToast(_ todoId: String, store: StoreOf private let isSelected: Bool private let windowEvent: TodoEditorWindowEvent @@ -92,7 +91,8 @@ public struct TodayView: View { } } .padding(.top, 4 * AdaptiveSize.boardScale) - .frame(maxWidth: readableContentWidth) + // 사이드바가 있으면 칸 가운데 목록 폭으로 모으고 스크롤 영역은 칸 전체 폭 유지 + .frame(maxWidth: usesDesktopLayout ? 600 * AdaptiveSize.boardScale : .infinity) .frame(maxWidth: .infinity) } .safeAreaInset(edge: .top, spacing: 0) { @@ -113,7 +113,6 @@ public struct TodayView: View { } .frame(maxWidth: .infinity, alignment: .leading) .padding(.horizontal) - .frame(maxWidth: readableContentWidth) .padding(.top, windowControlsInset) .padding(.bottom, 12) }