mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Merge pull request #5200 from saymanrifat/saymanrifat-5095-subtitle-optz
fix: increase subtitle font size in fullscreen
This commit is contained in:
commit
d3d0cc917a
@ -692,16 +692,26 @@ open class CustomExoPlayerView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onFullscreenChange(isFullscreen: Boolean) {
|
override fun onFullscreenChange(isFullscreen: Boolean) {
|
||||||
if (PlayerHelper.swipeGestureEnabled && this::brightnessHelper.isInitialized) {
|
if (isFullscreen) {
|
||||||
if (isFullscreen) {
|
if (PlayerHelper.swipeGestureEnabled && this::brightnessHelper.isInitialized) {
|
||||||
brightnessHelper.restoreSavedBrightness()
|
brightnessHelper.restoreSavedBrightness()
|
||||||
if (resizeMode == AspectRatioFrameLayout.RESIZE_MODE_ZOOM) {
|
|
||||||
subtitleView?.setBottomPaddingFraction(SUBTITLE_BOTTOM_PADDING_FRACTION)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
brightnessHelper.resetToSystemBrightness(false)
|
|
||||||
subtitleView?.setBottomPaddingFraction(SubtitleView.DEFAULT_BOTTOM_PADDING_FRACTION)
|
|
||||||
}
|
}
|
||||||
|
subtitleView?.setFixedTextSize(
|
||||||
|
Cue.TEXT_SIZE_TYPE_ABSOLUTE,
|
||||||
|
PlayerHelper.captionsTextSize * 1.5f
|
||||||
|
)
|
||||||
|
if (resizeMode == AspectRatioFrameLayout.RESIZE_MODE_ZOOM) {
|
||||||
|
subtitleView?.setBottomPaddingFraction(SUBTITLE_BOTTOM_PADDING_FRACTION)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (PlayerHelper.swipeGestureEnabled && this::brightnessHelper.isInitialized) {
|
||||||
|
brightnessHelper.resetToSystemBrightness(false)
|
||||||
|
}
|
||||||
|
subtitleView?.setFixedTextSize(
|
||||||
|
Cue.TEXT_SIZE_TYPE_ABSOLUTE,
|
||||||
|
PlayerHelper.captionsTextSize
|
||||||
|
)
|
||||||
|
subtitleView?.setBottomPaddingFraction(SubtitleView.DEFAULT_BOTTOM_PADDING_FRACTION)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user