Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Crisp/Views/BrightnessSliderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ struct BrightnessStepButton: View {
Button(action: {}) {
Image(systemName: systemName)
.font(.system(size: 15))
// Widest glyph (speaker.wave.3.fill, 24pt), so stacked
// brightness and volume tracks line up.
.frame(width: 24)
}
.buttonStyle(HoldRepeatButtonStyle(action: action))
.accessibilityHidden(true)
Expand Down
3 changes: 2 additions & 1 deletion Crisp/Views/VolumeSliderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ struct VolumeSliderView: View {
VolumeService.shared.setVolume(localVolume, for: display)
}
}
.controlSize(.small)
// Same size as the brightness slider above it (docs/ui-notes.md).
.controlSize(SystemLook.isMacOS27OrLater ? .regular : .small)
.accessibilityLabel("Speaker volume")
.accessibilityValue("\(Int(localVolume))%")
.onChange(of: localVolume) { _, newValue in
Expand Down
2 changes: 1 addition & 1 deletion docs/ui-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A click on the brightness slider glides to the target over 200ms instead of jump

## BrightnessSliderView: control size by OS

Control Center's brightness slider grew on macOS 27: measured on its display panel the track is 6pt and the knob 16pt, against the 4pt track and 14pt knob that SwiftUI's .small control size draws. .regular matches the macOS 27 size, so the brightness sliders switch to .regular on macOS 27 or later and keep .small on macOS 26 and earlier.
Control Center's brightness slider grew on macOS 27: measured on its display panel the track is 6pt and the knob 16pt, against the 4pt track and 14pt knob that SwiftUI's .small control size draws. .regular matches the macOS 27 size, so the brightness sliders and the volume slider under them switch to .regular on macOS 27 or later and keep .small on macOS 26 and earlier.

## Color.secondaryReadable

Expand Down
Loading