diff --git a/Application/Presentation/PresentationShared/Sources/Common/Component/CompositionContainer.swift b/Application/Presentation/PresentationShared/Sources/Common/Component/CompositionContainer.swift index 7d33cf64..d83145b2 100644 --- a/Application/Presentation/PresentationShared/Sources/Common/Component/CompositionContainer.swift +++ b/Application/Presentation/PresentationShared/Sources/Common/Component/CompositionContainer.swift @@ -97,7 +97,7 @@ public extension View { // 고르는 화면 // 좁은 창은 시트로 띄우고, 칸으로 나눈 화면은 compositionPickerAnchor를 붙인 버튼 아래에 직접 그린 판으로 띄움 - // maxHeight가 없으면 판을 내용 높이에 맞춤 + // maxHeight가 없으면 판을 내용 높이에 맞추고, 창이 낮으면 남은 높이까지 줄임 func compositionPicker( isPresented: Binding, isActive: Bool = true, @@ -482,7 +482,6 @@ private struct CompositionPickerPanel: View { .frame(height: min(maxHeight, available)) } else { content - .fixedSize(horizontal: false, vertical: true) } } .frame(width: width) @@ -493,6 +492,8 @@ private struct CompositionPickerPanel: View { .strokeBorder(Color.separator) } .shadow(color: Color.black.opacity(colorScheme == .dark ? 0.5 : 0.12), radius: 30, y: 24) + // 내용 높이에 맞춘 판도 창 아래 여백 안까지만 높이를 내줌 + .frame(maxHeight: available, alignment: .top) .offset(x: leading, y: top) } } diff --git a/Application/Presentation/ProfileTab/Sources/Profile/ActivityCard.swift b/Application/Presentation/ProfileTab/Sources/Profile/ActivityCard.swift index 6b221fab..695a0d9b 100644 --- a/Application/Presentation/ProfileTab/Sources/Profile/ActivityCard.swift +++ b/Application/Presentation/ProfileTab/Sources/Profile/ActivityCard.swift @@ -223,32 +223,7 @@ struct QuarterPickerSheet: View { // Mac, iPad 넓은 화면 분기 선택 판 // 위쪽 제목·완료 줄, 바탕 없는 연도 행, 1~4분기 두 줄 격자 배치 private var desktopContent: some View { - VStack(spacing: 0) { - ZStack { - Text(String(localized: "profile_select_quarter", bundle: PresentationResources.bundle)) - .font(.system(size: isiOSAppOnMac ? 14 * AdaptiveSize.boardScale : 17, weight: .bold)) - HStack { - Spacer() - Button { - store.send(.setQuarterPickerPresented(false)) - } label: { - Text(String(localized: "common_done", bundle: PresentationResources.bundle)) - .font(.adaptive(isiOSAppOnMac ? .body : .callout).bold()) - .foregroundStyle(Color.label) - .padding(.horizontal, 4 * AdaptiveSize.boardScale) - .contentShape(.rect) - } - .buttonStyle(.plain) - } - } - .padding(.horizontal, 10 * AdaptiveSize.boardScale) - .frame(height: isiOSAppOnMac ? 44 * AdaptiveSize.boardScale : 52) - .overlay(alignment: .bottom) { - Rectangle() - .fill(Color.separator) - .frame(height: 1) - } - + let content = VStack(spacing: 0) { // 연도 값이 행 오른쪽 끝에 있어 메뉴 오른쪽 끝을 행 오른쪽 끝에 맞춤 DropdownMenu( alignment: .trailing, @@ -289,6 +264,41 @@ struct QuarterPickerSheet: View { .padding(.top, isiOSAppOnMac ? 8 * AdaptiveSize.boardScale : 12) .padding(.bottom, isiOSAppOnMac ? 14 * AdaptiveSize.boardScale : 16) } + + return VStack(spacing: 0) { + ZStack { + Text(String(localized: "profile_select_quarter", bundle: PresentationResources.bundle)) + .font(.system(size: isiOSAppOnMac ? 14 * AdaptiveSize.boardScale : 17, weight: .bold)) + HStack { + Spacer() + Button { + store.send(.setQuarterPickerPresented(false)) + } label: { + Text(String(localized: "common_done", bundle: PresentationResources.bundle)) + .font(.adaptive(isiOSAppOnMac ? .body : .callout).bold()) + .foregroundStyle(Color.label) + .padding(.horizontal, 4 * AdaptiveSize.boardScale) + .contentShape(.rect) + } + .buttonStyle(.plain) + } + } + .padding(.horizontal, 10 * AdaptiveSize.boardScale) + .frame(height: isiOSAppOnMac ? 44 * AdaptiveSize.boardScale : 52) + .overlay(alignment: .bottom) { + Rectangle() + .fill(Color.separator) + .frame(height: 1) + } + + // 창이 낮아 판이 줄면 제목 줄 아래 내용만 스크롤 + ViewThatFits(in: .vertical) { + content + ScrollView { + content + } + } + } } private var mobileContent: some View {