You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Android Editor: Fix padding for display cutout in fullscreen mode
This commit is contained in:
@@ -392,7 +392,12 @@ class Godot private constructor(val context: Context) {
|
|||||||
ViewCompat.setOnApplyWindowInsetsListener(rootView) { v: View, insets: WindowInsetsCompat ->
|
ViewCompat.setOnApplyWindowInsetsListener(rootView) { v: View, insets: WindowInsetsCompat ->
|
||||||
v.post {
|
v.post {
|
||||||
if (useImmersive.get()) {
|
if (useImmersive.get()) {
|
||||||
|
if (isEditorBuild()) {
|
||||||
|
val windowInsets = insets.getInsets(WindowInsetsCompat.Type.displayCutout())
|
||||||
|
v.setPadding(windowInsets.left, windowInsets.top, windowInsets.right, windowInsets.bottom)
|
||||||
|
} else {
|
||||||
v.setPadding(0, 0, 0, 0)
|
v.setPadding(0, 0, 0, 0)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
val windowInsets = insets.getInsets(getInsetType())
|
val windowInsets = insets.getInsets(getInsetType())
|
||||||
v.setPadding(windowInsets.left, windowInsets.top, windowInsets.right, windowInsets.bottom)
|
v.setPadding(windowInsets.left, windowInsets.top, windowInsets.right, windowInsets.bottom)
|
||||||
|
|||||||
Reference in New Issue
Block a user