font size setting
This commit is contained in:
@@ -27,6 +27,11 @@ struct SettingsView: View {
|
||||
.foregroundStyle(Palette.muted)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
ServerColorPicker()
|
||||
heading("Font size")
|
||||
Text("The size of body text, on every Mac you use. Other text grows and shrinks with it.")
|
||||
.foregroundStyle(Palette.muted)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
FontSizeStepper()
|
||||
heading("Notifications")
|
||||
DeviceNotifications()
|
||||
PrefsBox()
|
||||
@@ -87,12 +92,33 @@ private struct ServerColorPicker: View {
|
||||
}
|
||||
}
|
||||
|
||||
private struct FontSizeStepper: View {
|
||||
var body: some View {
|
||||
let fonts = FontSize.shared
|
||||
HStack(spacing: 8) {
|
||||
Button("−") {
|
||||
fonts.set(fonts.body - 1)
|
||||
}
|
||||
.buttonStyle(WebButtonStyle())
|
||||
.disabled(fonts.body <= FontSize.range.lowerBound)
|
||||
Text("\(fonts.body) pt")
|
||||
.monospacedDigit()
|
||||
Button("+") {
|
||||
fonts.set(fonts.body + 1)
|
||||
}
|
||||
.buttonStyle(WebButtonStyle())
|
||||
.disabled(fonts.body >= FontSize.range.upperBound)
|
||||
}
|
||||
.padding(.top, 8)
|
||||
}
|
||||
}
|
||||
|
||||
private struct SyncState: View {
|
||||
var body: some View {
|
||||
TimelineView(.periodic(from: .now, by: 30)) { _ in
|
||||
if let sync = Servers.shared.sync {
|
||||
if sync.ok {
|
||||
Text("This Mac shares its servers, window colours, drafts and task visits through iCloud. Last synced \(ago(sync.at)).")
|
||||
Text("This Mac shares its servers, window colours, font size, drafts and task visits through iCloud. Last synced \(ago(sync.at)).")
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
} else {
|
||||
Text("iCloud sync is failing on this Mac, so changes made here aren't reaching your other Macs. Failed \(ago(sync.at)): \(sync.error ?? "")")
|
||||
|
||||
Reference in New Issue
Block a user