From 29ffed265b3d81f0154040480a38a284f0329c4e Mon Sep 17 00:00:00 2001 From: Kayos Date: Mon, 25 May 2026 11:54:45 -0700 Subject: [PATCH] vc=29: fullscreen overlay controls respect display cutout + status bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In portrait fullscreen, the camera notch / cutout was eating the top overlay buttons — SB pill, Speed, Headphones, Videocam, Share, PiP, Minimize. Tappable area sat under the cutout shadow; presses dropped. Wrapped the overlay layer (SB pill + control Row) in a Box with windowInsetsPadding(WindowInsets.safeDrawing). safeDrawing is the union of system bars + display cutouts + IME, so this single modifier covers both portrait (notch at top) and landscape (cutout at side) without per-orientation logic. The PlayerView itself still uses fillMaxSize with no inset padding — video stays full-bleed and reads as immersive; only the touch-targets respect the safe area. --- buildSrc/src/main/kotlin/ProjectConfig.kt | 4 ++-- .../sulkta/straw/feature/player/PlayerScreen.kt | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/ProjectConfig.kt b/buildSrc/src/main/kotlin/ProjectConfig.kt index 225345b66..83175d02a 100644 --- a/buildSrc/src/main/kotlin/ProjectConfig.kt +++ b/buildSrc/src/main/kotlin/ProjectConfig.kt @@ -55,6 +55,6 @@ const val NEWPIPE_APPLICATION_ID_NEW = "net.newpipe.app" // vc=19 / 0.1.0-AE — rust pipeline cutover. Extraction via // strawcore-core (Sulkta-Coop/strawcore) via the UniFFI wrapper; no // NewPipeExtractor in the runtime path. -const val STRAW_VERSION_CODE = 28 -const val STRAW_VERSION_NAME = "0.1.0-AN" +const val STRAW_VERSION_CODE = 29 +const val STRAW_VERSION_NAME = "0.1.0-AO" const val STRAW_APPLICATION_ID = "com.sulkta.straw" diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt index 4266cf34b..0c3ee8f01 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt @@ -27,9 +27,12 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.safeDrawing import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.KeyboardArrowDown @@ -153,6 +156,8 @@ fun PlayerScreen( ) else -> { + // Video surface — bleeds full-screen including under any + // display cutout / camera notch. Looks more immersive. AndroidView( factory = { ctx -> PlayerView(ctx).apply { @@ -164,6 +169,15 @@ fun PlayerScreen( onRelease = { it.player = null }, modifier = Modifier.fillMaxSize(), ) + // Overlay controls layer — sits inside the safe area so + // buttons don't get eaten by the notch in portrait or by + // a side cutout in landscape. SafeDrawing covers system + // bars + display cutouts in one go. + Box( + modifier = Modifier + .fillMaxSize() + .windowInsetsPadding(WindowInsets.safeDrawing), + ) { Box( modifier = Modifier .align(Alignment.TopStart) @@ -231,6 +245,7 @@ fun PlayerScreen( onMinimize() } } + } // close safe-area overlay Box if (showSpeedDialog) { SpeedPickerDialog(