feat: drag subtitle

Closes #588

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-03 20:04:56 +08:00
parent 6a7d14a3f8
commit 09c8a41c52
6 changed files with 146 additions and 140 deletions

View File

@@ -256,6 +256,7 @@ class PlPlayerController {
late final darkVideoPage = GStorage.darkVideoPage;
late final enableSlideVolumeBrightness = GStorage.enableSlideVolumeBrightness;
late final enableSlideFS = GStorage.enableSlideFS;
late final enableDragSubtitle = GStorage.enableDragSubtitle;
/// 弹幕权重
int danmakuWeight = 0;
@@ -324,6 +325,11 @@ class PlPlayerController {
);
}
void onUpdatePadding(EdgeInsets padding) {
subtitlePaddingB = padding.bottom.round().clamp(0, 200);
putSubtitleSettings();
}
void updateSliderPositionSecond() {
int newSecond = _sliderPosition.value.inSeconds;
if (sliderPositionSeconds.value != newSecond) {