The custom sleep timer was a bottom sheet fixed at 400pt. With the largest
text sizes its content outgrew that: the title ran past the top edge, and in
landscape, where the sheet goes full screen, the title and Cancel were cut
off with nothing to scroll.
It's now a popover from the sleep timer button. A popover sizes itself to
its content, so it grows with the text instead of clipping, and on iPad and
iPhone Duo it opens next to the button instead of as a card in the middle
of the screen. It keeps the title and the same wheels (the native countdown
picker was replaced on purpose for themes and the Mac), with a tinted
capsule OK; tapping outside cancels, so Cancel goes. OK is disabled at
0 hours 0 minutes, which used to start a timer with nothing to count.
Problem
The custom sleep timer was a bottom sheet fixed at 400pt (
.presentationDetents([.height(400)])). With the largest text sizes its content outgrew that: in portrait the title ran past the sheet's top edge, and in landscape (where the sheet goes full screen, 402pt tall) the content needed about 474pt, so the title and Cancel were cut off with nothing to scroll. On iPad, and the open iPhone Duo, it showed as a card in the middle of the screen.Changes
DurationPickerPopover(wasDurationPickerSheet): a popover from the sleep timer button. A popover sizes itself to its content, so it grows with the text instead of clipping; on iPad and iPhone Duo it opens next to the button.presentationCompactAdaptation(.popover)keeps it a popover on iPhone.NativeDurationPicker). The native countdown picker (UIDatePicker) isn't used: it was replaced on purpose in bcf215f for themes and the Mac..glassProminent, the theme's link color). Tapping outside cancels, so Cancel goes.MediaActionRow: shows a popover from the sleep timer button (showsTimerPopover+ atimerPopoverbuilder).PlayerViewModel/PlayerView: the Custom option setsshowsCustomSleepTimer; the.sleepsheet style is gone.Testing