mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Use constant for subtitle padding fraction
This commit is contained in:
parent
769d09f98d
commit
5457494340
@ -514,7 +514,7 @@ internal class CustomExoPlayerView(
|
||||
resizeMode = AspectRatioFrameLayout.RESIZE_MODE_ZOOM
|
||||
|
||||
if (resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
subtitleView?.setBottomPaddingFraction(0.158f)
|
||||
subtitleView?.setBottomPaddingFraction(SUBTITLE_BOTTOM_PADDING_FRACTION)
|
||||
}
|
||||
}
|
||||
|
||||
@ -529,7 +529,7 @@ internal class CustomExoPlayerView(
|
||||
if (isFullscreen) {
|
||||
brightnessHelper.restoreSavedBrightness()
|
||||
if (resizeMode == AspectRatioFrameLayout.RESIZE_MODE_ZOOM) {
|
||||
subtitleView?.setBottomPaddingFraction(0.158f)
|
||||
subtitleView?.setBottomPaddingFraction(SUBTITLE_BOTTOM_PADDING_FRACTION)
|
||||
}
|
||||
} else {
|
||||
brightnessHelper.resetToSystemBrightness(false)
|
||||
@ -537,4 +537,8 @@ internal class CustomExoPlayerView(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val SUBTITLE_BOTTOM_PADDING_FRACTION = 0.158f
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user