mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-15 23:10:09 +08:00
@@ -5,6 +5,7 @@ import 'package:PiliPlus/grpc/bilibili/community/service/dm/v1.pb.dart';
|
||||
import 'package:PiliPlus/grpc/dm.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/controller.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/danmaku_options.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/path_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
@@ -67,7 +68,7 @@ class PlDanmakuController {
|
||||
final uniques = HashMap<String, DanmakuElem>();
|
||||
|
||||
final shouldFilter = _plPlayerController.filters.count != 0;
|
||||
final danmakuWeight = _plPlayerController.danmakuWeight;
|
||||
final danmakuWeight = DanmakuOptions.danmakuWeight;
|
||||
for (final element in elems) {
|
||||
if (_isLogin) {
|
||||
element.isSelf = element.midHash == _plPlayerController.midHash;
|
||||
|
||||
@@ -1289,16 +1289,16 @@ class HeaderControlState extends State<HeaderControl>
|
||||
);
|
||||
}
|
||||
|
||||
double get subtitleFontScale => plPlayerController.subtitleFontScale;
|
||||
double get subtitleFontScaleFS => plPlayerController.subtitleFontScaleFS;
|
||||
int get subtitlePaddingH => plPlayerController.subtitlePaddingH;
|
||||
int get subtitlePaddingB => plPlayerController.subtitlePaddingB;
|
||||
double get subtitleBgOpacity => plPlayerController.subtitleBgOpacity;
|
||||
double get subtitleStrokeWidth => plPlayerController.subtitleStrokeWidth;
|
||||
int get subtitleFontWeight => plPlayerController.subtitleFontWeight;
|
||||
|
||||
/// 字幕设置
|
||||
void showSetSubtitle() {
|
||||
double subtitleFontScale = plPlayerController.subtitleFontScale;
|
||||
double subtitleFontScaleFS = plPlayerController.subtitleFontScaleFS;
|
||||
int subtitlePaddingH = plPlayerController.subtitlePaddingH;
|
||||
int subtitlePaddingB = plPlayerController.subtitlePaddingB;
|
||||
double subtitleBgOpacity = plPlayerController.subtitleBgOpacity;
|
||||
double subtitleStrokeWidth = plPlayerController.subtitleStrokeWidth;
|
||||
int subtitleFontWeight = plPlayerController.subtitleFontWeight;
|
||||
|
||||
showBottomSheet(
|
||||
padding: isFullScreen ? 70 : null,
|
||||
(context, setState) {
|
||||
@@ -1314,57 +1314,50 @@ class HeaderControlState extends State<HeaderControl>
|
||||
);
|
||||
|
||||
void updateStrokeWidth(double val) {
|
||||
subtitleStrokeWidth = val;
|
||||
plPlayerController
|
||||
..subtitleStrokeWidth = subtitleStrokeWidth
|
||||
..subtitleStrokeWidth = val
|
||||
..updateSubtitleStyle();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void updateOpacity(double val) {
|
||||
subtitleBgOpacity = val.toPrecision(2);
|
||||
plPlayerController
|
||||
..subtitleBgOpacity = subtitleBgOpacity
|
||||
..subtitleBgOpacity = val.toPrecision(2)
|
||||
..updateSubtitleStyle();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void updateBottomPadding(double val) {
|
||||
subtitlePaddingB = val.round();
|
||||
plPlayerController
|
||||
..subtitlePaddingB = subtitlePaddingB
|
||||
..subtitlePaddingB = val.round()
|
||||
..updateSubtitleStyle();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void updateHorizontalPadding(double val) {
|
||||
subtitlePaddingH = val.round();
|
||||
plPlayerController
|
||||
..subtitlePaddingH = subtitlePaddingH
|
||||
..subtitlePaddingH = val.round()
|
||||
..updateSubtitleStyle();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void updateFontScaleFS(double val) {
|
||||
subtitleFontScaleFS = val;
|
||||
plPlayerController
|
||||
..subtitleFontScaleFS = subtitleFontScaleFS
|
||||
..subtitleFontScaleFS = val
|
||||
..updateSubtitleStyle();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void updateFontScale(double val) {
|
||||
subtitleFontScale = val;
|
||||
plPlayerController
|
||||
..subtitleFontScale = subtitleFontScale
|
||||
..subtitleFontScale = val
|
||||
..updateSubtitleStyle();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void updateFontWeight(double val) {
|
||||
subtitleFontWeight = val.toInt();
|
||||
plPlayerController
|
||||
..subtitleFontWeight = subtitleFontWeight
|
||||
..subtitleFontWeight = val.toInt()
|
||||
..updateSubtitleStyle();
|
||||
setState(() {});
|
||||
}
|
||||
@@ -1391,12 +1384,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
Text(
|
||||
'字体大小 ${(subtitleFontScale * 100).toStringAsFixed(1)}%',
|
||||
),
|
||||
resetBtn(
|
||||
theme,
|
||||
'100.0%',
|
||||
() => updateFontScale(1.0),
|
||||
isDanmaku: false,
|
||||
),
|
||||
resetBtn(theme, '100.0%', () => updateFontScale(1.0)),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
@@ -1416,8 +1404,6 @@ class HeaderControlState extends State<HeaderControl>
|
||||
label:
|
||||
'${(subtitleFontScale * 100).toStringAsFixed(1)}%',
|
||||
onChanged: updateFontScale,
|
||||
onChangeEnd: (_) =>
|
||||
plPlayerController.putSubtitleSettings(),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1427,12 +1413,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
Text(
|
||||
'全屏字体大小 ${(subtitleFontScaleFS * 100).toStringAsFixed(1)}%',
|
||||
),
|
||||
resetBtn(
|
||||
theme,
|
||||
'150.0%',
|
||||
() => updateFontScaleFS(1.5),
|
||||
isDanmaku: false,
|
||||
),
|
||||
resetBtn(theme, '150.0%', () => updateFontScaleFS(1.5)),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
@@ -1452,8 +1433,6 @@ class HeaderControlState extends State<HeaderControl>
|
||||
label:
|
||||
'${(subtitleFontScaleFS * 100).toStringAsFixed(1)}%',
|
||||
onChanged: updateFontScaleFS,
|
||||
onChangeEnd: (_) =>
|
||||
plPlayerController.putSubtitleSettings,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1461,12 +1440,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('字体粗细 ${subtitleFontWeight + 1}(可能无法精确调节)'),
|
||||
resetBtn(
|
||||
theme,
|
||||
6,
|
||||
() => updateFontWeight(5),
|
||||
isDanmaku: false,
|
||||
),
|
||||
resetBtn(theme, 6, () => updateFontWeight(5)),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
@@ -1485,8 +1459,6 @@ class HeaderControlState extends State<HeaderControl>
|
||||
divisions: 8,
|
||||
label: '${subtitleFontWeight + 1}',
|
||||
onChanged: updateFontWeight,
|
||||
onChangeEnd: (_) =>
|
||||
plPlayerController.putSubtitleSettings(),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1494,12 +1466,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('描边粗细 $subtitleStrokeWidth'),
|
||||
resetBtn(
|
||||
theme,
|
||||
2.0,
|
||||
() => updateStrokeWidth(2.0),
|
||||
isDanmaku: false,
|
||||
),
|
||||
resetBtn(theme, 2.0, () => updateStrokeWidth(2.0)),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
@@ -1518,8 +1485,6 @@ class HeaderControlState extends State<HeaderControl>
|
||||
divisions: 10,
|
||||
label: '$subtitleStrokeWidth',
|
||||
onChanged: updateStrokeWidth,
|
||||
onChangeEnd: (_) =>
|
||||
plPlayerController.putSubtitleSettings(),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1527,12 +1492,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('左右边距 $subtitlePaddingH'),
|
||||
resetBtn(
|
||||
theme,
|
||||
24,
|
||||
() => updateHorizontalPadding(24),
|
||||
isDanmaku: false,
|
||||
),
|
||||
resetBtn(theme, 24, () => updateHorizontalPadding(24)),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
@@ -1551,8 +1511,6 @@ class HeaderControlState extends State<HeaderControl>
|
||||
divisions: 100,
|
||||
label: '$subtitlePaddingH',
|
||||
onChanged: updateHorizontalPadding,
|
||||
onChangeEnd: (_) =>
|
||||
plPlayerController.putSubtitleSettings(),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1560,12 +1518,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('底部边距 $subtitlePaddingB'),
|
||||
resetBtn(
|
||||
theme,
|
||||
24,
|
||||
() => updateBottomPadding(24),
|
||||
isDanmaku: false,
|
||||
),
|
||||
resetBtn(theme, 24, () => updateBottomPadding(24)),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
@@ -1584,8 +1537,6 @@ class HeaderControlState extends State<HeaderControl>
|
||||
divisions: 200,
|
||||
label: '$subtitlePaddingB',
|
||||
onChanged: updateBottomPadding,
|
||||
onChangeEnd: (_) =>
|
||||
plPlayerController.putSubtitleSettings(),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1593,12 +1544,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('背景不透明度 ${(subtitleBgOpacity * 100).toInt()}%'),
|
||||
resetBtn(
|
||||
theme,
|
||||
'67%',
|
||||
() => updateOpacity(0.67),
|
||||
isDanmaku: false,
|
||||
),
|
||||
resetBtn(theme, '67%', () => updateOpacity(0.67)),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
@@ -1615,8 +1561,6 @@ class HeaderControlState extends State<HeaderControl>
|
||||
max: 1,
|
||||
value: subtitleBgOpacity,
|
||||
onChanged: updateOpacity,
|
||||
onChangeEnd: (_) =>
|
||||
plPlayerController.putSubtitleSettings(),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1626,7 +1570,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
)?.whenComplete(plPlayerController.putSubtitleSettings);
|
||||
}
|
||||
|
||||
void showDanmakuPool() {
|
||||
|
||||
@@ -4,8 +4,6 @@ import 'package:PiliPlus/plugin/pl_player/controller.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/danmaku_options.dart';
|
||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -33,21 +31,11 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget resetBtn(
|
||||
ThemeData theme,
|
||||
Object def,
|
||||
VoidCallback onPressed, {
|
||||
bool isDanmaku = true,
|
||||
}) {
|
||||
Widget resetBtn(ThemeData theme, Object def, VoidCallback onPressed) {
|
||||
return iconButton(
|
||||
tooltip: '默认值: $def',
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () {
|
||||
onPressed();
|
||||
if (!isDanmaku) {
|
||||
plPlayerController.putSubtitleSettings();
|
||||
}
|
||||
},
|
||||
onPressed: onPressed,
|
||||
iconColor: theme.colorScheme.outline,
|
||||
size: 24,
|
||||
iconSize: 24,
|
||||
@@ -55,7 +43,7 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
}
|
||||
|
||||
/// 弹幕功能
|
||||
Future<void> showSetDanmaku({bool isLive = false}) async {
|
||||
void showSetDanmaku({bool isLive = false}) {
|
||||
// 屏蔽类型
|
||||
const blockTypesList = [
|
||||
(value: 2, label: '滚动'),
|
||||
@@ -69,7 +57,7 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
|
||||
final isFullScreen = this.isFullScreen;
|
||||
|
||||
await showBottomSheet(
|
||||
showBottomSheet(
|
||||
(context, setState) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
@@ -147,7 +135,7 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
}
|
||||
|
||||
void updateDanmakuWeight(double val) {
|
||||
plPlayerController.danmakuWeight = val.toInt();
|
||||
DanmakuOptions.danmakuWeight = val.toInt();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@@ -184,7 +172,7 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
Row(
|
||||
mainAxisAlignment: .spaceBetween,
|
||||
children: [
|
||||
Text('智能云屏蔽 ${plPlayerController.danmakuWeight} 级'),
|
||||
Text('智能云屏蔽 ${DanmakuOptions.danmakuWeight} 级'),
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -215,14 +203,10 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
child: Slider(
|
||||
min: 0,
|
||||
max: 10,
|
||||
value: plPlayerController.danmakuWeight.toDouble(),
|
||||
value: DanmakuOptions.danmakuWeight.toDouble(),
|
||||
divisions: 10,
|
||||
label: '${plPlayerController.danmakuWeight}',
|
||||
label: DanmakuOptions.danmakuWeight.toString(),
|
||||
onChanged: updateDanmakuWeight,
|
||||
onChangeEnd: (val) => GStorage.setting.put(
|
||||
SettingBoxKey.danmakuWeight,
|
||||
val.toInt(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -255,30 +239,30 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
spacing: 10,
|
||||
children: [
|
||||
ActionRowLineItem(
|
||||
selectStatus: DanmakuOptions.massiveMode,
|
||||
selectStatus: DanmakuOptions.danmakuMassiveMode,
|
||||
onTap: () {
|
||||
DanmakuOptions.massiveMode =
|
||||
!DanmakuOptions.massiveMode;
|
||||
DanmakuOptions.danmakuMassiveMode =
|
||||
!DanmakuOptions.danmakuMassiveMode;
|
||||
setState(() {});
|
||||
setOptions();
|
||||
},
|
||||
text: '海量弹幕',
|
||||
),
|
||||
ActionRowLineItem(
|
||||
selectStatus: DanmakuOptions.static2Scroll,
|
||||
selectStatus: DanmakuOptions.danmakuStatic2Scroll,
|
||||
onTap: () {
|
||||
DanmakuOptions.static2Scroll =
|
||||
!DanmakuOptions.static2Scroll;
|
||||
DanmakuOptions.danmakuStatic2Scroll =
|
||||
!DanmakuOptions.danmakuStatic2Scroll;
|
||||
setState(() {});
|
||||
setOptions();
|
||||
},
|
||||
text: '固定转滚动',
|
||||
),
|
||||
ActionRowLineItem(
|
||||
selectStatus: DanmakuOptions.scrollFixedVelocity,
|
||||
selectStatus: DanmakuOptions.danmakuFixedV,
|
||||
onTap: () {
|
||||
DanmakuOptions.scrollFixedVelocity =
|
||||
!DanmakuOptions.scrollFixedVelocity;
|
||||
DanmakuOptions.danmakuFixedV =
|
||||
!DanmakuOptions.danmakuFixedV;
|
||||
setState(() {});
|
||||
setOptions();
|
||||
},
|
||||
@@ -534,9 +518,9 @@ mixin HeaderMixin<T extends StatefulWidget> on State<T> {
|
||||
),
|
||||
);
|
||||
},
|
||||
)?.whenComplete(
|
||||
() => DanmakuOptions.save(plPlayerController.danmakuOpacity.value),
|
||||
);
|
||||
|
||||
await DanmakuOptions.save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import 'package:PiliPlus/plugin/pl_player/models/video_fit_type.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/fullscreen.dart';
|
||||
import 'package:PiliPlus/services/service_locator.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/extension/box_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/string_ext.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
@@ -323,7 +324,6 @@ class PlPlayerController {
|
||||
|
||||
// 弹幕相关配置
|
||||
late final enableTapDm = PlatformUtils.isMobile && Pref.enableTapDm;
|
||||
late int danmakuWeight = Pref.danmakuWeight;
|
||||
late RuleFilter filters = Pref.danmakuFilterRule;
|
||||
// 关联弹幕控制器
|
||||
DanmakuController<DanmakuExtra>? danmakuController;
|
||||
@@ -1667,7 +1667,7 @@ class PlPlayerController {
|
||||
}
|
||||
|
||||
void putSubtitleSettings() {
|
||||
setting.putAll({
|
||||
setting.putAllNE({
|
||||
SettingBoxKey.subtitleFontScale: subtitleFontScale,
|
||||
SettingBoxKey.subtitleFontScaleFS: subtitleFontScaleFS,
|
||||
SettingBoxKey.subtitlePaddingH: subtitlePaddingH,
|
||||
|
||||
@@ -8,19 +8,20 @@ abstract final class DanmakuOptions {
|
||||
static final Set<int> blockTypes = Pref.danmakuBlockType;
|
||||
static bool blockColorful = blockTypes.contains(6);
|
||||
|
||||
static int danmakuWeight = Pref.danmakuWeight;
|
||||
static double danmakuFontScaleFS = Pref.danmakuFontScaleFS;
|
||||
static double danmakuFontScale = Pref.danmakuFontScale;
|
||||
static int danmakuFontWeight = Pref.fontWeight;
|
||||
static int danmakuFontWeight = Pref.danmakuFontWeight;
|
||||
static double danmakuShowArea = Pref.danmakuShowArea;
|
||||
static double danmakuDuration = Pref.danmakuDuration;
|
||||
static double danmakuStaticDuration = Pref.danmakuStaticDuration;
|
||||
static double danmakuStrokeWidth = Pref.strokeWidth;
|
||||
static bool scrollFixedVelocity = Pref.danmakuFixedV;
|
||||
static bool static2Scroll = Pref.static2Scroll;
|
||||
static bool massiveMode = Pref.danmakuMassiveMode;
|
||||
static double danmakuStrokeWidth = Pref.danmakuStrokeWidth;
|
||||
static bool danmakuFixedV = Pref.danmakuFixedV;
|
||||
static bool danmakuStatic2Scroll = Pref.danmakuStatic2Scroll;
|
||||
static bool danmakuMassiveMode = Pref.danmakuMassiveMode;
|
||||
static double danmakuLineHeight = Pref.danmakuLineHeight;
|
||||
|
||||
static bool sameFontScale = danmakuFontScale == danmakuFontScaleFS;
|
||||
static bool get sameFontScale => danmakuFontScale == danmakuFontScaleFS;
|
||||
|
||||
static DanmakuOption get({
|
||||
required bool notFullscreen,
|
||||
@@ -37,15 +38,15 @@ abstract final class DanmakuOptions {
|
||||
hideTop: blockTypes.contains(5),
|
||||
hideSpecial: blockTypes.contains(7),
|
||||
strokeWidth: danmakuStrokeWidth,
|
||||
scrollFixedVelocity: scrollFixedVelocity,
|
||||
massiveMode: massiveMode,
|
||||
static2Scroll: static2Scroll,
|
||||
scrollFixedVelocity: danmakuFixedV,
|
||||
massiveMode: danmakuMassiveMode,
|
||||
static2Scroll: danmakuStatic2Scroll,
|
||||
safeArea: true,
|
||||
lineHeight: danmakuLineHeight,
|
||||
);
|
||||
}
|
||||
|
||||
static Future<void>? save() {
|
||||
static Future<void>? save(double danmakuOpacity) {
|
||||
return GStorage.setting.putAllNE({
|
||||
SettingBoxKey.danmakuBlockType: blockTypes.toList(),
|
||||
SettingBoxKey.danmakuShowArea: danmakuShowArea,
|
||||
@@ -53,9 +54,14 @@ abstract final class DanmakuOptions {
|
||||
SettingBoxKey.danmakuFontScaleFS: danmakuFontScaleFS,
|
||||
SettingBoxKey.danmakuDuration: danmakuDuration,
|
||||
SettingBoxKey.danmakuStaticDuration: danmakuStaticDuration,
|
||||
SettingBoxKey.strokeWidth: danmakuStrokeWidth,
|
||||
SettingBoxKey.fontWeight: danmakuFontWeight,
|
||||
SettingBoxKey.danmakuStrokeWidth: danmakuStrokeWidth,
|
||||
SettingBoxKey.danmakuFontWeight: danmakuFontWeight,
|
||||
SettingBoxKey.danmakuLineHeight: danmakuLineHeight,
|
||||
SettingBoxKey.danmakuMassiveMode: danmakuMassiveMode,
|
||||
SettingBoxKey.danmakuStatic2Scroll: danmakuStatic2Scroll,
|
||||
SettingBoxKey.danmakuFixedV: danmakuFixedV,
|
||||
SettingBoxKey.danmakuWeight: danmakuWeight,
|
||||
SettingBoxKey.danmakuOpacity: danmakuOpacity,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,10 +192,10 @@ abstract final class SettingBoxKey {
|
||||
danmakuStaticDuration = 'danmakuStaticDuration',
|
||||
danmakuMassiveMode = 'danmakuMassiveMode',
|
||||
danmakuFixedV = 'danmakuFixedV',
|
||||
static2Scroll = 'static2Scroll',
|
||||
danmakuStatic2Scroll = 'danmakuStatic2Scroll',
|
||||
danmakuLineHeight = 'danmakuLineHeight',
|
||||
strokeWidth = 'strokeWidth',
|
||||
fontWeight = 'fontWeight';
|
||||
danmakuStrokeWidth = 'strokeWidth',
|
||||
danmakuFontWeight = 'fontWeight';
|
||||
|
||||
static const String systemProxyHost = 'systemProxyHost',
|
||||
systemProxyPort = 'systemProxyPort';
|
||||
|
||||
@@ -322,8 +322,8 @@ abstract final class Pref {
|
||||
static bool get danmakuFixedV =>
|
||||
_setting.get(SettingBoxKey.danmakuFixedV, defaultValue: false);
|
||||
|
||||
static bool get static2Scroll =>
|
||||
_setting.get(SettingBoxKey.static2Scroll, defaultValue: false);
|
||||
static bool get danmakuStatic2Scroll =>
|
||||
_setting.get(SettingBoxKey.danmakuStatic2Scroll, defaultValue: false);
|
||||
|
||||
static double get subtitleFontScale =>
|
||||
_setting.get(SettingBoxKey.subtitleFontScale, defaultValue: 1.0);
|
||||
@@ -733,11 +733,11 @@ abstract final class Pref {
|
||||
static double get danmakuStaticDuration =>
|
||||
_setting.get(SettingBoxKey.danmakuStaticDuration, defaultValue: 4.0);
|
||||
|
||||
static double get strokeWidth =>
|
||||
_setting.get(SettingBoxKey.strokeWidth, defaultValue: 1.5);
|
||||
static double get danmakuStrokeWidth =>
|
||||
_setting.get(SettingBoxKey.danmakuStrokeWidth, defaultValue: 1.5);
|
||||
|
||||
static int get fontWeight =>
|
||||
_setting.get(SettingBoxKey.fontWeight, defaultValue: 5);
|
||||
static int get danmakuFontWeight =>
|
||||
_setting.get(SettingBoxKey.danmakuFontWeight, defaultValue: 5);
|
||||
|
||||
static bool get enableLongShowControl =>
|
||||
_setting.get(SettingBoxKey.enableLongShowControl, defaultValue: false);
|
||||
|
||||
Reference in New Issue
Block a user