mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: dark video page
Closes #420 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:PiliPlus/common/widgets/refresh_indicator.dart'
|
||||
import 'package:PiliPlus/http/interceptor.dart';
|
||||
import 'package:PiliPlus/http/reply.dart';
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/main.dart';
|
||||
import 'package:PiliPlus/models/common/audio_normalization.dart';
|
||||
import 'package:PiliPlus/models/common/dynamic_badge_mode.dart';
|
||||
import 'package:PiliPlus/models/common/dynamics_type.dart';
|
||||
@@ -206,6 +207,18 @@ List<SettingsModel> get styleSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前:${GStorage.mediumCardWidth.toInt()}dp,屏幕宽度:${MediaQuery.of(Get.context!).size.width.toPrecision(2)}dp。宽度越小列数越多。',
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '视频播放页使用深色主题',
|
||||
leading: Icon(Icons.dark_mode_outlined),
|
||||
setKey: SettingBoxKey.darkVideoPage,
|
||||
defaultVal: false,
|
||||
onChanged: (value) {
|
||||
if (value && MyApp.darkThemeData == null) {
|
||||
Get.forceAppUpdate();
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '播放页移除安全边距',
|
||||
@@ -496,7 +509,8 @@ List<SettingsModel> get styleSettings => [
|
||||
setKey: SettingBoxKey.isPureBlackTheme,
|
||||
defaultVal: false,
|
||||
onChanged: (value) {
|
||||
if (Theme.of(Get.context!).brightness == Brightness.dark) {
|
||||
if (Theme.of(Get.context!).brightness == Brightness.dark ||
|
||||
GStorage.darkVideoPage) {
|
||||
Get.forceAppUpdate();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user