From c930b2bad2152dd8815a4b5114ddbd352c0200c0 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 16 May 2023 15:09:31 -0400 Subject: [PATCH] android: Use cutout insets on setup fragment --- .../java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt index 13b8315db6..1536220724 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt @@ -278,12 +278,13 @@ class SetupFragment : Fragment() { private fun setInsets() = ViewCompat.setOnApplyWindowInsetsListener(binding.root) { view: View, windowInsets: WindowInsetsCompat -> - val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) + val barInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) + val cutoutInsets = windowInsets.getInsets(WindowInsetsCompat.Type.displayCutout()) view.setPadding( - insets.left, - insets.top, - insets.right, - insets.bottom + barInsets.left + cutoutInsets.left, + barInsets.top + cutoutInsets.top, + barInsets.right + cutoutInsets.right, + barInsets.bottom + cutoutInsets.bottom ) windowInsets }