Composer: Scale input font on macOS

This commit is contained in:
Thomas Ricouard 2023-01-18 08:04:52 +01:00
parent c7a832e110
commit 02aa91f432
2 changed files with 9 additions and 0 deletions

View file

@ -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))

View file

@ -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 {