Add window fullscreen detection and improve iPad controls spacing

Adds fullscreen detection utility to Constants.swift to determine if the window occupies the full screen on iOS. Uses this to conditionally add leading padding to player controls on iPad in non-fullscreen windows, preventing overlap with system window controls.
This commit is contained in:
Arkadiusz Fal
2025-11-15 00:04:30 +01:00
parent c47c52f8f3
commit ccdfdf781d
2 changed files with 34 additions and 0 deletions

View File

@@ -329,6 +329,14 @@ struct PlayerControls: View {
var buttonsBar: some View {
HStack(spacing: playerControlsLayout.buttonsSpacing) {
#if os(iOS)
// On iPad in resizable windows, add leading space to avoid system window controls
if Constants.isIPad, !Constants.isWindowFullscreen {
Spacer()
.frame(width: Constants.iPadSystemControlsWidth)
}
#endif
fullscreenButton
pipButton