opt player

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-17 17:03:01 +08:00
parent d9a0db03f8
commit b043dc38c4
6 changed files with 33 additions and 128 deletions

View File

@@ -374,16 +374,29 @@ class PlPlayerController {
late final Rx<SubtitleViewConfiguration> subtitleConfig = _getSubConfig.obs;
SubtitleViewConfiguration get _getSubConfig => SubtitleViewConfiguration(
style: subTitleStyle,
padding: EdgeInsets.only(
left: subtitlePaddingH.toDouble(),
right: subtitlePaddingH.toDouble(),
bottom: subtitlePaddingB.toDouble(),
),
textScaleFactor: 1,
strokeWidth: subtitleBgOpaticy == 0 ? subtitleStrokeWidth : null,
);
SubtitleViewConfiguration get _getSubConfig {
final subTitleStyle = this.subTitleStyle;
return SubtitleViewConfiguration(
style: subTitleStyle,
strokeStyle: subtitleBgOpaticy == 0
? subTitleStyle.copyWith(
color: null,
background: null,
backgroundColor: null,
foreground: Paint()
..color = Colors.black
..style = PaintingStyle.stroke
..strokeWidth = subtitleStrokeWidth,
)
: null,
padding: EdgeInsets.only(
left: subtitlePaddingH.toDouble(),
right: subtitlePaddingH.toDouble(),
bottom: subtitlePaddingB.toDouble(),
),
textScaleFactor: 1,
);
}
void updateSubtitleStyle() {
subtitleConfig.value = _getSubConfig;