Add horizontal padding to player controls in non-fullscreen iPad windows

When the iPad window is resized (not fullscreen), player controls now have 10px horizontal padding from the edges for better spacing and visual comfort.
This commit is contained in:
Arkadiusz Fal
2025-11-15 11:39:14 +01:00
parent 0fcdf2398e
commit 7812fc6a8d

View File

@@ -110,6 +110,9 @@ struct PlayerControls: View {
Spacer()
}
.offset(y: playerControlsLayout.osdVerticalOffset + 5)
#if os(iOS)
.padding(.horizontal, Constants.isIPad && !Constants.isWindowFullscreen ? 10 : 0)
#endif
Section {
#if !os(tvOS)
@@ -121,6 +124,9 @@ struct PlayerControls: View {
seekForwardButton
}
.font(.system(size: playerControlsLayout.bigButtonFontSize))
#if os(iOS)
.padding(.horizontal, Constants.isIPad && !Constants.isWindowFullscreen ? 10 : 0)
#endif
#endif
ZStack(alignment: .bottom) {
@@ -171,6 +177,9 @@ struct PlayerControls: View {
}
.zIndex(1)
.padding(.top, 2)
#if os(iOS)
.padding(.horizontal, Constants.isIPad && !Constants.isWindowFullscreen ? 10 : 0)
#endif
.transition(.opacity)
HStack(spacing: playerControlsLayout.buttonsSpacing) {
@@ -207,6 +216,9 @@ struct PlayerControls: View {
.offset(y: -playerControlsLayout.timelineHeight - 30)
#else
.offset(y: -playerControlsLayout.timelineHeight - 5)
#if os(iOS)
.padding(.horizontal, Constants.isIPad && !Constants.isWindowFullscreen ? 10 : 0)
#endif
#endif
}
}