mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-17 02:05:13 +00:00
Composer: Scale input font on macOS
This commit is contained in:
parent
c7a832e110
commit
02aa91f432
2 changed files with 9 additions and 0 deletions
|
@ -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 {
|
public static var scaledCallout: Font {
|
||||||
if ProcessInfo.processInfo.isiOSAppOnMac {
|
if ProcessInfo.processInfo.isiOSAppOnMac {
|
||||||
return .system(size: userScaledFontSize(baseSize: 17))
|
return .system(size: userScaledFontSize(baseSize: 17))
|
||||||
|
|
|
@ -39,6 +39,7 @@ public struct StatusEditorView: View {
|
||||||
.padding(.horizontal, .layoutPadding)
|
.padding(.horizontal, .layoutPadding)
|
||||||
TextView($viewModel.statusText, $viewModel.selectedRange)
|
TextView($viewModel.statusText, $viewModel.selectedRange)
|
||||||
.placeholder("What's on your mind")
|
.placeholder("What's on your mind")
|
||||||
|
.font(Font.scaledBodyUIFont)
|
||||||
.padding(.horizontal, .layoutPadding)
|
.padding(.horizontal, .layoutPadding)
|
||||||
StatusEditorMediaView(viewModel: viewModel)
|
StatusEditorMediaView(viewModel: viewModel)
|
||||||
if let status = viewModel.embeddedStatus {
|
if let status = viewModel.embeddedStatus {
|
||||||
|
|
Loading…
Reference in a new issue