Skip to content

Commit b6d75d7

Browse files
committed
Merge pull request #112881 from syntaxerror247/fix-editor-ui-reg
Android Editor: Fix padding for display cutout in fullscreen mode
2 parents ee60dce + acdace4 commit b6d75d7

File tree

1 file changed

+6
-1
lines changed
  • platform/android/java/lib/src/main/java/org/godotengine/godot

1 file changed

+6
-1
lines changed

platform/android/java/lib/src/main/java/org/godotengine/godot/Godot.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,12 @@ class Godot private constructor(val context: Context) {
392392
ViewCompat.setOnApplyWindowInsetsListener(rootView) { v: View, insets: WindowInsetsCompat ->
393393
v.post {
394394
if (useImmersive.get()) {
395-
v.setPadding(0, 0, 0, 0)
395+
if (isEditorBuild()) {
396+
val windowInsets = insets.getInsets(WindowInsetsCompat.Type.displayCutout())
397+
v.setPadding(windowInsets.left, windowInsets.top, windowInsets.right, windowInsets.bottom)
398+
} else {
399+
v.setPadding(0, 0, 0, 0)
400+
}
396401
} else {
397402
val windowInsets = insets.getInsets(getInsetType())
398403
v.setPadding(windowInsets.left, windowInsets.top, windowInsets.right, windowInsets.bottom)

0 commit comments

Comments
 (0)