From 02aa91f432d145af29d92991a1f81126f2f1705a Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Wed, 18 Jan 2023 08:04:52 +0100 Subject: [PATCH] Composer: Scale input font on macOS --- Packages/DesignSystem/Sources/DesignSystem/Font.swift | 8 ++++++++ .../Status/Sources/Status/Editor/StatusEditorView.swift | 1 + 2 files changed, 9 insertions(+) diff --git a/Packages/DesignSystem/Sources/DesignSystem/Font.swift b/Packages/DesignSystem/Sources/DesignSystem/Font.swift index 75689e82..9bb48080 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Font.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Font.swift @@ -32,6 +32,14 @@ extension Font { } } + public static var scaledBodyUIFont: UIFont { + if ProcessInfo.processInfo.isiOSAppOnMac { + return UIFont.systemFont(ofSize: userScaledFontSize(baseSize: 19)) + } else { + return UIFont.systemFont(ofSize: 17) + } + } + public static var scaledCallout: Font { if ProcessInfo.processInfo.isiOSAppOnMac { return .system(size: userScaledFontSize(baseSize: 17)) diff --git a/Packages/Status/Sources/Status/Editor/StatusEditorView.swift b/Packages/Status/Sources/Status/Editor/StatusEditorView.swift index 24eda040..f1105eff 100644 --- a/Packages/Status/Sources/Status/Editor/StatusEditorView.swift +++ b/Packages/Status/Sources/Status/Editor/StatusEditorView.swift @@ -39,6 +39,7 @@ public struct StatusEditorView: View { .padding(.horizontal, .layoutPadding) TextView($viewModel.statusText, $viewModel.selectedRange) .placeholder("What's on your mind") + .font(Font.scaledBodyUIFont) .padding(.horizontal, .layoutPadding) StatusEditorMediaView(viewModel: viewModel) if let status = viewModel.embeddedStatus {