From e2401b984e1955818601e54ab7c13b0555ebfa08 Mon Sep 17 00:00:00 2001 From: xhon-pelushi Date: Thu, 13 Aug 2026 00:15:39 -0400 Subject: [PATCH] Give the settings icon a top inset margin The settings/quick-toggles button was pinned flush to the top edge of the screen, unlike the other top-row elements (main preview frame, QR-scan toggles) which already get pushed down by the system-bar inset in the same window-insets listener. That left the button directly under the area the transient system status bar overlay briefly occupies right after the app launches, making it hard to tap. Apply the same top margin used for the QR-scan toggles row so the settings icon clears that area too. Fixes #589 --- .../grapheneos/camera/ui/activities/MainActivity.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt b/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt index ea82300f..104582d4 100644 --- a/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt +++ b/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt @@ -1040,6 +1040,19 @@ open class MainActivity : AppCompatActivity(), it } + settingsIcon.layoutParams = + (settingsIcon.layoutParams as ViewGroup.MarginLayoutParams).let { + it.setMargins( + it.leftMargin, + (16 * resources.displayMetrics.density.toInt()) + + insets.top, + it.rightMargin, + it.bottomMargin, + ) + + it + } + isInsetSet = true }