From 3f393fd56f7b4189a1f1fd3a22de823ab6976391 Mon Sep 17 00:00:00 2001 From: Seb3thehacker Date: Sun, 25 Oct 2026 01:06:55 -0700 Subject: [PATCH] car: the size setting no longer scales the safe-area inset padding, which added margins on a car that reports insets --- .../src/main/java/app/seb3thehacker/gearslip/car/CarUi.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/car/CarUi.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/car/CarUi.kt index 1daccb9..cf0bddb 100644 --- a/gearslip/src/main/java/app/seb3thehacker/gearslip/car/CarUi.kt +++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/car/CarUi.kt @@ -222,8 +222,10 @@ fun CarUi() { }, color = MaterialTheme.colorScheme.background, ) { - // Insets are in video-frame pixels, so convert with the un-scaled density. - val pad = with(base) { + // Insets are video-frame pixels. Resolve them with the live (size-scaled) density, + // which padding() also uses, so the safe-area margin stays one fixed physical size + // at every size setting instead of growing with it and eating the screen's sides. + val pad = with(LocalDensity.current) { PaddingValues( start = insets.left.toDp(), top = insets.top.toDp(), end = insets.right.toDp(), bottom = insets.bottom.toDp(),