mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-23 12:21:21 -08:00
android: Fix FPS text getting cut off by rounded display corners
This commit is contained in:
parent
fdd200d33f
commit
ad9c2356a8
@ -354,12 +354,23 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||||||
|
|
||||||
v.setPadding(left, cutInsets.top, right, 0)
|
v.setPadding(left, cutInsets.top, right, 0)
|
||||||
|
|
||||||
|
// Ensure FPS text doesn't get cut off by rounded display corners
|
||||||
|
val sidePadding = resources.getDimensionPixelSize(R.dimen.spacing_xtralarge)
|
||||||
|
if (cutInsets.left == 0) {
|
||||||
|
binding.showFpsText.setPadding(
|
||||||
|
sidePadding,
|
||||||
|
cutInsets.top,
|
||||||
|
cutInsets.right,
|
||||||
|
cutInsets.bottom
|
||||||
|
)
|
||||||
|
} else {
|
||||||
binding.showFpsText.setPadding(
|
binding.showFpsText.setPadding(
|
||||||
cutInsets.left,
|
cutInsets.left,
|
||||||
cutInsets.top,
|
cutInsets.top,
|
||||||
cutInsets.right,
|
cutInsets.right,
|
||||||
cutInsets.bottom
|
cutInsets.bottom
|
||||||
)
|
)
|
||||||
|
}
|
||||||
windowInsets
|
windowInsets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,13 @@
|
|||||||
android:id="@+id/show_fps_text"
|
android:id="@+id/show_fps_text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:shadowColor="@android:color/black"
|
android:shadowColor="@android:color/black"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp"
|
||||||
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style="@style/Widget.Material3.Button.ElevatedButton"
|
style="@style/Widget.Material3.Button.ElevatedButton"
|
||||||
|
Loading…
Reference in New Issue
Block a user