From 6fab19598d517c1144a252bdf1a3bda678944077 Mon Sep 17 00:00:00 2001 From: opficdev Date: Mon, 23 Nov 2026 22:10:40 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=ED=85=8C=EB=91=90=EB=A6=AC=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EB=AA=A8=EC=96=91=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=9E=90=EC=99=80=20OutlineButtonFill=20=EC=83=89=EC=83=81=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Extension/Color+Assets.swift | 1 + .../View+OutlineButtonBackground.swift | 21 ++++++++++ .../OutlineButtonFill.colorset/Contents.json | 38 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 Application/Presentation/PresentationShared/Sources/Extension/View+OutlineButtonBackground.swift create mode 100644 Application/Shared/Resources/ColorPalette.xcassets/OutlineButtonFill.colorset/Contents.json diff --git a/Application/Presentation/PresentationShared/Sources/Extension/Color+Assets.swift b/Application/Presentation/PresentationShared/Sources/Extension/Color+Assets.swift index 8a50d774..9526c9d8 100644 --- a/Application/Presentation/PresentationShared/Sources/Extension/Color+Assets.swift +++ b/Application/Presentation/PresentationShared/Sources/Extension/Color+Assets.swift @@ -22,6 +22,7 @@ public extension Color { bundle: PresentationResources.bundle ) static let multilineInputBorder = Color("MultilineInputBorder", bundle: PresentationResources.bundle) + static let outlineButtonFill = Color("OutlineButtonFill", bundle: PresentationResources.bundle) static let secondaryBackground = Color("SecondaryBackground", bundle: PresentationResources.bundle) static let secondaryLabel = Color("SecondaryLabel", bundle: PresentationResources.bundle) static let secondarySeparator = Color("SecondarySeparator", bundle: PresentationResources.bundle) diff --git a/Application/Presentation/PresentationShared/Sources/Extension/View+OutlineButtonBackground.swift b/Application/Presentation/PresentationShared/Sources/Extension/View+OutlineButtonBackground.swift new file mode 100644 index 00000000..67a0d9e7 --- /dev/null +++ b/Application/Presentation/PresentationShared/Sources/Extension/View+OutlineButtonBackground.swift @@ -0,0 +1,21 @@ +// +// View+OutlineButtonBackground.swift +// PresentationShared +// +// Created by opfic on 11/23/26. +// + +import SwiftUI + +public extension View { + // 채우지 않은 버튼의 테두리 버튼 모양 + // Orca outline 버튼처럼 옅은 바탕, 테두리와 옅은 그림자 + func outlineButtonBackground() -> some View { + background { + RoundedRectangle(cornerRadius: CornerRadius.control) + .fill(Color.outlineButtonFill) + .strokeBorder(Color.inputBorder) + .shadow(color: .black.opacity(0.05), radius: 1, y: 1) + } + } +} diff --git a/Application/Shared/Resources/ColorPalette.xcassets/OutlineButtonFill.colorset/Contents.json b/Application/Shared/Resources/ColorPalette.xcassets/OutlineButtonFill.colorset/Contents.json new file mode 100644 index 00000000..b1e2e836 --- /dev/null +++ b/Application/Shared/Resources/ColorPalette.xcassets/OutlineButtonFill.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors": [ + { + "color": { + "color-space": "srgb", + "components": { + "alpha": "1.000", + "blue": "0xFF", + "green": "0xFF", + "red": "0xFF" + } + }, + "idiom": "universal" + }, + { + "appearances": [ + { + "appearance": "luminosity", + "value": "dark" + } + ], + "color": { + "color-space": "srgb", + "components": { + "alpha": "0.045", + "blue": "0xFF", + "green": "0xFF", + "red": "0xFF" + } + }, + "idiom": "universal" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} From 3f6b2ebff6d26a28db7228259cedb6538d1e96bb Mon Sep 17 00:00:00 2001 From: opficdev Date: Mon, 23 Nov 2026 22:10:40 +0900 Subject: [PATCH 2/2] =?UTF-8?q?ui:=20=EC=B1=84=EC=9A=B0=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=80=20=EB=B2=84=ED=8A=BC=EC=9D=84=20=ED=85=8C?= =?UTF-8?q?=EB=91=90=EB=A6=AC=20=EB=B2=84=ED=8A=BC=20=EB=AA=A8=EC=96=91?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/Component/LoginButton.swift | 6 +-- .../Sources/Category/CategoryManageView.swift | 6 +-- .../HomeTab/Sources/Home/HomeView.swift | 8 +--- .../Sources/Record/RecordPresentation.swift | 21 ++++++--- .../Sources/Extension/View+Alert.swift | 9 +--- .../Settings/DesktopSettingsComponents.swift | 47 ++++++++++--------- 6 files changed, 45 insertions(+), 52 deletions(-) diff --git a/Application/Presentation/Entry/Sources/Common/Component/LoginButton.swift b/Application/Presentation/Entry/Sources/Common/Component/LoginButton.swift index a3902e42..ef3c0b0c 100644 --- a/Application/Presentation/Entry/Sources/Common/Component/LoginButton.swift +++ b/Application/Presentation/Entry/Sources/Common/Component/LoginButton.swift @@ -50,11 +50,7 @@ struct LoginButton: View { } .frame(maxWidth: .infinity, minHeight: isiOSAppOnMac ? 40 * AdaptiveSize.boardScale : 52) .contentShape(.rect(cornerRadius: CornerRadius.control)) - .background { - RoundedRectangle(cornerRadius: CornerRadius.control) - .fill(Color.secondaryBackground) - .stroke(Color.separator, lineWidth: 1) - } + .outlineButtonBackground() } } } diff --git a/Application/Presentation/HomeTab/Sources/Category/CategoryManageView.swift b/Application/Presentation/HomeTab/Sources/Category/CategoryManageView.swift index 1cc70055..b32acf8f 100644 --- a/Application/Presentation/HomeTab/Sources/Category/CategoryManageView.swift +++ b/Application/Presentation/HomeTab/Sources/Category/CategoryManageView.swift @@ -51,11 +51,7 @@ struct CategoryManageView: View { .frame(maxWidth: usesDesktopLayout ? nil : .infinity) .frame(height: isiOSAppOnMac ? 32 * AdaptiveSize.boardScale : 44) .padding(.horizontal, 16 * AdaptiveSize.boardScale) - .background(Color.tertiaryBackground, in: .rect(cornerRadius: CornerRadius.control)) - .overlay { - RoundedRectangle(cornerRadius: CornerRadius.control) - .strokeBorder(Color.secondarySeparator) - } + .outlineButtonBackground() } .buttonStyle(.plain) .frame(maxWidth: .infinity, alignment: .leading) diff --git a/Application/Presentation/HomeTab/Sources/Home/HomeView.swift b/Application/Presentation/HomeTab/Sources/Home/HomeView.swift index 5ebdd160..d219393a 100644 --- a/Application/Presentation/HomeTab/Sources/Home/HomeView.swift +++ b/Application/Presentation/HomeTab/Sources/Home/HomeView.swift @@ -543,17 +543,13 @@ private struct HomeTodoSection: View { Button { store.send(.view(.tapManageTodoCategory)) } label: { - // Todo 타일과 같은 바탕·테두리의 작은 버튼 + // 테두리 버튼 모양의 작은 버튼 Text("todo_edit", bundle: PresentationResources.bundle) .font(.adaptive(.footnote).weight(.medium)) .foregroundStyle(Color.label) .padding(.horizontal, isiOSAppOnMac ? 8 * AdaptiveSize.boardScale : 10) .frame(minHeight: isiOSAppOnMac ? 24 * AdaptiveSize.boardScale : 28) - .background(Color.secondaryBackground, in: .rect(cornerRadius: CornerRadius.control)) - .overlay { - RoundedRectangle(cornerRadius: CornerRadius.control) - .strokeBorder(Color.secondarySeparator) - } + .outlineButtonBackground() .contentShape(.rect) } .buttonStyle(.plain) diff --git a/Application/Presentation/HomeTab/Sources/Record/RecordPresentation.swift b/Application/Presentation/HomeTab/Sources/Record/RecordPresentation.swift index 978d869f..2c16da89 100644 --- a/Application/Presentation/HomeTab/Sources/Record/RecordPresentation.swift +++ b/Application/Presentation/HomeTab/Sources/Record/RecordPresentation.swift @@ -96,7 +96,7 @@ struct RecordTopBarTextButton: View { } // 반경 6의 높이 44 버튼, Mac은 높이 32 -// 강조 버튼은 흑백 채움 바탕, 보조 버튼은 회색 바탕과 테두리 +// 강조 버튼은 흑백 채움 바탕, 보조 버튼은 테두리 버튼 모양 struct RecordButtonStyle: ButtonStyle { @Environment(\.isEnabled) private var isEnabled @Environment(\.isiOSAppOnMac) private var isiOSAppOnMac @@ -105,18 +105,25 @@ struct RecordButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { let shape = RoundedRectangle(cornerRadius: CornerRadius.control) - - configuration.label + let label = configuration.label .font(.adaptive(isiOSAppOnMac ? .body : .subheadline).weight(.semibold)) .foregroundStyle(isProminent ? Color.background : .label) .lineLimit(1) .padding(.horizontal, 16 * AdaptiveSize.boardScale) .frame(maxWidth: fillsWidth ? .infinity : nil) .frame(height: isiOSAppOnMac ? 32 * AdaptiveSize.boardScale : 44) - .background(isProminent ? Color.label : .tertiaryBackground, in: shape) - .overlay { shape.strokeBorder(isProminent ? Color.label : .secondarySeparator) } - .opacity(isEnabled ? configuration.isPressed ? 0.7 : 1 : 0.4) - .contentShape(shape) + + Group { + if isProminent { + label + .background(Color.label, in: shape) + .overlay { shape.strokeBorder(Color.label) } + } else { + label.outlineButtonBackground() + } + } + .opacity(isEnabled ? configuration.isPressed ? 0.7 : 1 : 0.4) + .contentShape(shape) } } diff --git a/Application/Presentation/PresentationShared/Sources/Extension/View+Alert.swift b/Application/Presentation/PresentationShared/Sources/Extension/View+Alert.swift index c36c879e..d79e01f3 100644 --- a/Application/Presentation/PresentationShared/Sources/Extension/View+Alert.swift +++ b/Application/Presentation/PresentationShared/Sources/Extension/View+Alert.swift @@ -120,14 +120,7 @@ where State: ObservableState { maxWidth: usesDesktopLayout ? nil : .infinity, minHeight: isiOSAppOnMac ? 32 * AdaptiveSize.boardScale : 44 ) - .background( - usesDefaultAction ? Color.clear : .tertiaryBackground, - in: .rect(cornerRadius: CornerRadius.control) - ) - .overlay { - RoundedRectangle(cornerRadius: CornerRadius.control) - .strokeBorder(Color.secondarySeparator) - } + .outlineButtonBackground() .contentShape(.rect) } .buttonStyle(.plain) diff --git a/Application/Presentation/ProfileTab/Sources/Settings/DesktopSettingsComponents.swift b/Application/Presentation/ProfileTab/Sources/Settings/DesktopSettingsComponents.swift index 19e1c809..2d0d2f6e 100644 --- a/Application/Presentation/ProfileTab/Sources/Settings/DesktopSettingsComponents.swift +++ b/Application/Presentation/ProfileTab/Sources/Settings/DesktopSettingsComponents.swift @@ -189,32 +189,37 @@ struct DesktopSettingsButton: View { case .prominent: .background case .destructive: .danger } - let border: Color = switch role { - case .normal: .separator - case .prominent: .label - case .destructive: .danger + let label = ZStack { + Text(title) + .opacity(showsProgress ? 0 : 1) + + if showsProgress { + ProgressView() + .controlSize(.small) + .tint(color) + } } + .font(.adaptive(.footnote).weight(.semibold)) + .foregroundStyle(color) + .padding(.horizontal, 12 * AdaptiveSize.boardScale) + .frame(minHeight: isiOSAppOnMac ? 22 * AdaptiveSize.boardScale : 34) Button(action: action) { - ZStack { - Text(title) - .opacity(showsProgress ? 0 : 1) - - if showsProgress { - ProgressView() - .controlSize(.small) - .tint(color) + // 일반 버튼은 테두리 버튼 모양, 강조와 삭제 버튼은 역할 색 테두리 + Group { + if role == .normal { + label.outlineButtonBackground() + } else { + let border = role == .prominent ? Color.label : .danger + + label + .background(role == .prominent ? Color.label : .clear, in: .rect(cornerRadius: CornerRadius.control)) + .overlay { + RoundedRectangle(cornerRadius: CornerRadius.control) + .strokeBorder(border) + } } } - .font(.adaptive(.footnote).weight(.semibold)) - .foregroundStyle(color) - .padding(.horizontal, 12 * AdaptiveSize.boardScale) - .frame(minHeight: isiOSAppOnMac ? 22 * AdaptiveSize.boardScale : 34) - .background(role == .prominent ? Color.label : .clear, in: .rect(cornerRadius: CornerRadius.control)) - .overlay { - RoundedRectangle(cornerRadius: CornerRadius.control) - .strokeBorder(border) - } .contentShape(.rect) } .buttonStyle(.plain)