mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
custom show fs lock btn
Closes #1150 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -42,6 +42,13 @@ List<SettingsModel> get playSettings => [
|
||||
setKey: SettingBoxKey.autoPlayEnable,
|
||||
defaultVal: false,
|
||||
),
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '全屏显示锁定按钮',
|
||||
leading: Icon(Icons.lock_outline),
|
||||
setKey: SettingBoxKey.showFsLockBtn,
|
||||
defaultVal: true,
|
||||
),
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '全屏显示截图按钮',
|
||||
|
||||
@@ -327,6 +327,7 @@ class PlPlayerController {
|
||||
late final horizontalPreview = Pref.horizontalPreview;
|
||||
late final showDmChart = Pref.showDmChart;
|
||||
late final showFsScreenshotBtn = Pref.showFsScreenshotBtn;
|
||||
late final showFsLockBtn = Pref.showFsLockBtn;
|
||||
|
||||
late final bool autoExitFullscreen = Pref.autoExitFullscreen;
|
||||
late final bool autoPlayEnable = Pref.autoPlayEnable;
|
||||
|
||||
@@ -1571,7 +1571,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
),
|
||||
|
||||
// 锁
|
||||
if (!isLive && isFullScreen)
|
||||
if (!isLive && isFullScreen && plPlayerController.showFsScreenshotBtn)
|
||||
ViewSafeArea(
|
||||
right: false,
|
||||
child: Align(
|
||||
|
||||
@@ -133,6 +133,7 @@ class SettingBoxKey {
|
||||
directExitOnBack = 'directExitOnBack',
|
||||
quickFavId = 'quickFavId',
|
||||
showFsScreenshotBtn = 'showFsScreenshotBtn',
|
||||
showFsLockBtn = 'showFsLockBtn',
|
||||
silentDownImg = 'silentDownImg';
|
||||
|
||||
static const String subtitlePreferenceV2 = 'subtitlePreferenceV2',
|
||||
|
||||
@@ -793,6 +793,9 @@ class Pref {
|
||||
static bool get showFsScreenshotBtn =>
|
||||
_setting.get(SettingBoxKey.showFsScreenshotBtn, defaultValue: true);
|
||||
|
||||
static bool get showFsLockBtn =>
|
||||
_setting.get(SettingBoxKey.showFsLockBtn, defaultValue: true);
|
||||
|
||||
static bool get silentDownImg =>
|
||||
_setting.get(SettingBoxKey.silentDownImg, defaultValue: false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user