mirror of
https://github.com/yattee/yattee.git
synced 2025-11-16 06:58:43 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user