mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Update resize logic & use libass-media 0.4.0
This commit is contained in:
parent
fc5babac45
commit
5db6d2c901
2 changed files with 12 additions and 8 deletions
|
|
@ -461,13 +461,17 @@ fun PlaybackPageContent(
|
|||
.apply(it)
|
||||
it.children.firstOrNull { it is AssSubtitleView }?.let {
|
||||
(it as? AssSubtitleView)?.apply {
|
||||
Timber.v("Resize: $playerSize")
|
||||
layoutParams =
|
||||
FrameLayout
|
||||
.LayoutParams(
|
||||
playerSize.width,
|
||||
playerSize.height,
|
||||
).apply { gravity = Gravity.CENTER }
|
||||
val resized =
|
||||
layoutParams.let { it.width != playerSize.width || it.height != playerSize.height }
|
||||
if (resized) {
|
||||
Timber.v("Resizing AssSubtitleView: $playerSize")
|
||||
layoutParams =
|
||||
FrameLayout
|
||||
.LayoutParams(
|
||||
playerSize.width,
|
||||
playerSize.height,
|
||||
).apply { gravity = Gravity.CENTER }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue