mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-25 03:26:22 +08:00
custom show fs screenshot btn
Closes #1103 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.photo_camera_outlined),
|
||||
setKey: SettingBoxKey.showFsScreenshotBtn,
|
||||
defaultVal: true,
|
||||
),
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '双击快退/快进',
|
||||
|
||||
@@ -326,6 +326,7 @@ class PlPlayerController {
|
||||
late final reverseFromFirst = Pref.reverseFromFirst;
|
||||
late final horizontalPreview = Pref.horizontalPreview;
|
||||
late final showDmChart = Pref.showDmChart;
|
||||
late final showFsScreenshotBtn = Pref.showFsScreenshotBtn;
|
||||
|
||||
late final bool autoExitFullscreen = Pref.autoExitFullscreen;
|
||||
late final bool autoPlayEnable = Pref.autoPlayEnable;
|
||||
|
||||
@@ -1611,7 +1611,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
),
|
||||
|
||||
// 截图
|
||||
if (isFullScreen)
|
||||
if (isFullScreen && plPlayerController.showFsScreenshotBtn)
|
||||
ViewSafeArea(
|
||||
left: false,
|
||||
child: Obx(
|
||||
@@ -1656,6 +1656,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
shape: const RoundedRectangleBorder(),
|
||||
content: GestureDetector(
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
|
||||
String name = DateTime.now()
|
||||
.toString();
|
||||
final SaveResult result =
|
||||
@@ -1668,7 +1670,6 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
);
|
||||
|
||||
if (result.isSuccess) {
|
||||
Get.back();
|
||||
SmartDialog.showToast(
|
||||
'$name.png已保存到相册/截图',
|
||||
);
|
||||
|
||||
@@ -131,7 +131,8 @@ class SettingBoxKey {
|
||||
memberTab = 'memberTab',
|
||||
dynamicDetailRatio = 'dynamicDetailRatio',
|
||||
directExitOnBack = 'directExitOnBack',
|
||||
quickFavId = 'quickFavId';
|
||||
quickFavId = 'quickFavId',
|
||||
showFsScreenshotBtn = 'showFsScreenshotBtn';
|
||||
|
||||
static const String subtitlePreferenceV2 = 'subtitlePreferenceV2',
|
||||
enableDragSubtitle = 'enableDragSubtitle',
|
||||
|
||||
@@ -791,4 +791,7 @@ class Pref {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static bool get showFsScreenshotBtn =>
|
||||
_setting.get(SettingBoxKey.showFsScreenshotBtn, defaultValue: true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user