|
|
@ -46,6 +46,7 @@ import org.yuzu.yuzu_emu.utils.FileUtil
|
|
|
|
import org.yuzu.yuzu_emu.utils.GameIconUtils
|
|
|
|
import org.yuzu.yuzu_emu.utils.GameIconUtils
|
|
|
|
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
|
|
|
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
|
|
|
import org.yuzu.yuzu_emu.utils.MemoryUtil
|
|
|
|
import org.yuzu.yuzu_emu.utils.MemoryUtil
|
|
|
|
|
|
|
|
import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins
|
|
|
|
import java.io.BufferedOutputStream
|
|
|
|
import java.io.BufferedOutputStream
|
|
|
|
import java.io.File
|
|
|
|
import java.io.File
|
|
|
|
|
|
|
|
|
|
|
@ -320,46 +321,25 @@ class GamePropertiesFragment : Fragment() {
|
|
|
|
|
|
|
|
|
|
|
|
val smallLayout = resources.getBoolean(R.bool.small_layout)
|
|
|
|
val smallLayout = resources.getBoolean(R.bool.small_layout)
|
|
|
|
if (smallLayout) {
|
|
|
|
if (smallLayout) {
|
|
|
|
val mlpListAll =
|
|
|
|
binding.listAll.updateMargins(left = leftInsets, right = rightInsets)
|
|
|
|
binding.listAll.layoutParams as ViewGroup.MarginLayoutParams
|
|
|
|
|
|
|
|
mlpListAll.leftMargin = leftInsets
|
|
|
|
|
|
|
|
mlpListAll.rightMargin = rightInsets
|
|
|
|
|
|
|
|
binding.listAll.layoutParams = mlpListAll
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (ViewCompat.getLayoutDirection(binding.root) ==
|
|
|
|
if (ViewCompat.getLayoutDirection(binding.root) ==
|
|
|
|
ViewCompat.LAYOUT_DIRECTION_LTR
|
|
|
|
ViewCompat.LAYOUT_DIRECTION_LTR
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
val mlpListAll =
|
|
|
|
binding.listAll.updateMargins(right = rightInsets)
|
|
|
|
binding.listAll.layoutParams as ViewGroup.MarginLayoutParams
|
|
|
|
binding.iconLayout!!.updateMargins(top = barInsets.top, left = leftInsets)
|
|
|
|
mlpListAll.rightMargin = rightInsets
|
|
|
|
|
|
|
|
binding.listAll.layoutParams = mlpListAll
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val mlpIconLayout =
|
|
|
|
|
|
|
|
binding.iconLayout!!.layoutParams as ViewGroup.MarginLayoutParams
|
|
|
|
|
|
|
|
mlpIconLayout.topMargin = barInsets.top
|
|
|
|
|
|
|
|
mlpIconLayout.leftMargin = leftInsets
|
|
|
|
|
|
|
|
binding.iconLayout!!.layoutParams = mlpIconLayout
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
val mlpListAll =
|
|
|
|
binding.listAll.updateMargins(left = leftInsets)
|
|
|
|
binding.listAll.layoutParams as ViewGroup.MarginLayoutParams
|
|
|
|
binding.iconLayout!!.updateMargins(top = barInsets.top, right = rightInsets)
|
|
|
|
mlpListAll.leftMargin = leftInsets
|
|
|
|
|
|
|
|
binding.listAll.layoutParams = mlpListAll
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val mlpIconLayout =
|
|
|
|
|
|
|
|
binding.iconLayout!!.layoutParams as ViewGroup.MarginLayoutParams
|
|
|
|
|
|
|
|
mlpIconLayout.topMargin = barInsets.top
|
|
|
|
|
|
|
|
mlpIconLayout.rightMargin = rightInsets
|
|
|
|
|
|
|
|
binding.iconLayout!!.layoutParams = mlpIconLayout
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
val fabSpacing = resources.getDimensionPixelSize(R.dimen.spacing_fab)
|
|
|
|
val fabSpacing = resources.getDimensionPixelSize(R.dimen.spacing_fab)
|
|
|
|
val mlpFab =
|
|
|
|
binding.buttonStart.updateMargins(
|
|
|
|
binding.buttonStart.layoutParams as ViewGroup.MarginLayoutParams
|
|
|
|
left = leftInsets + fabSpacing,
|
|
|
|
mlpFab.leftMargin = leftInsets + fabSpacing
|
|
|
|
right = rightInsets + fabSpacing,
|
|
|
|
mlpFab.rightMargin = rightInsets + fabSpacing
|
|
|
|
bottom = barInsets.bottom + fabSpacing
|
|
|
|
mlpFab.bottomMargin = barInsets.bottom + fabSpacing
|
|
|
|
)
|
|
|
|
binding.buttonStart.layoutParams = mlpFab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
binding.layoutAll.updatePadding(
|
|
|
|
binding.layoutAll.updatePadding(
|
|
|
|
top = barInsets.top,
|
|
|
|
top = barInsets.top,
|
|
|
|