mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 07:06:14 +08:00
fix: subtitle padding
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -274,22 +274,20 @@ class PlPlayerController {
|
|||||||
backgroundColor: Colors.black.withOpacity(subtitleBgOpaticy),
|
backgroundColor: Colors.black.withOpacity(subtitleBgOpaticy),
|
||||||
);
|
);
|
||||||
|
|
||||||
void updateSubtitleStyle([double? value]) {
|
SubtitleViewConfiguration get subtitleViewConfiguration =>
|
||||||
key.currentState?.update(
|
SubtitleViewConfiguration(
|
||||||
subtitleViewConfiguration: SubtitleViewConfiguration(
|
style: subTitleStyle,
|
||||||
style: subTitleStyle.copyWith(
|
|
||||||
fontSize: 16 *
|
|
||||||
(value ??
|
|
||||||
(isFullScreen.value
|
|
||||||
? subtitleFontScaleFS
|
|
||||||
: subtitleFontScale))),
|
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: subtitlePaddingH.toDouble(),
|
left: subtitlePaddingH.toDouble(),
|
||||||
right: subtitlePaddingH.toDouble(),
|
right: subtitlePaddingH.toDouble(),
|
||||||
bottom: subtitlePaddingB.toDouble(),
|
bottom: subtitlePaddingB.toDouble(),
|
||||||
),
|
),
|
||||||
textScaleFactor: MediaQuery.textScalerOf(Get.context!).scale(1),
|
textScaleFactor: MediaQuery.textScalerOf(Get.context!).scale(1),
|
||||||
),
|
);
|
||||||
|
|
||||||
|
void updateSubtitleStyle() {
|
||||||
|
key.currentState?.update(
|
||||||
|
subtitleViewConfiguration: subtitleViewConfiguration,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -720,11 +720,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
!plPlayerController.continuePlayInBackground.value,
|
!plPlayerController.continuePlayInBackground.value,
|
||||||
resumeUponEnteringForegroundMode: true,
|
resumeUponEnteringForegroundMode: true,
|
||||||
// 字幕尺寸调节
|
// 字幕尺寸调节
|
||||||
subtitleViewConfiguration: SubtitleViewConfiguration(
|
subtitleViewConfiguration:
|
||||||
style: plPlayerController.subTitleStyle,
|
plPlayerController.subtitleViewConfiguration,
|
||||||
padding: const EdgeInsets.all(24.0),
|
|
||||||
textScaleFactor: MediaQuery.textScalerOf(context).scale(1),
|
|
||||||
),
|
|
||||||
fit: plPlayerController.videoFit.value,
|
fit: plPlayerController.videoFit.value,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user