mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
fix: Subtitle editor screens
This commit is contained in:
parent
0f4f829718
commit
ffac89899c
4 changed files with 36 additions and 25 deletions
|
|
@ -249,6 +249,21 @@ class _PlayerSettingsPageState extends ConsumerState<PlayerSettingsPage> {
|
|||
onChanged: (value) => provider.setUseLibass(value),
|
||||
),
|
||||
),
|
||||
if (!videoSettings.useLibass)
|
||||
SettingsListTile(
|
||||
label: Text(context.localized.settingsPlayerCustomSubtitlesTitle),
|
||||
subLabel: Text(context.localized.settingsPlayerCustomSubtitlesDesc),
|
||||
onTap: videoSettings.useLibass
|
||||
? null
|
||||
: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
useSafeArea: false,
|
||||
builder: (context) => const SubtitleEditor(),
|
||||
);
|
||||
},
|
||||
),
|
||||
AnimatedFadeSize(
|
||||
child: videoSettings.useLibass && videoSettings.hardwareAccel && Platform.isAndroid
|
||||
? SettingsMessageBox(
|
||||
|
|
@ -272,20 +287,6 @@ class _PlayerSettingsPageState extends ConsumerState<PlayerSettingsPage> {
|
|||
},
|
||||
)),
|
||||
),
|
||||
SettingsListTile(
|
||||
label: Text(context.localized.settingsPlayerCustomSubtitlesTitle),
|
||||
subLabel: Text(context.localized.settingsPlayerCustomSubtitlesDesc),
|
||||
onTap: videoSettings.useLibass
|
||||
? null
|
||||
: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
useSafeArea: false,
|
||||
builder: (context) => const SubtitleEditor(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
_ => SettingsMessageBox(
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ import 'package:fladder/models/settings/subtitle_settings_model.dart';
|
|||
import 'package:fladder/providers/settings/subtitle_settings_provider.dart';
|
||||
import 'package:fladder/providers/settings/video_player_settings_provider.dart';
|
||||
import 'package:fladder/screens/video_player/components/video_subtitle_controls.dart';
|
||||
import 'package:fladder/util/adaptive_layout/adaptive_layout.dart';
|
||||
import 'package:fladder/util/localization_helper.dart';
|
||||
import 'package:fladder/widgets/navigation_scaffold/components/fladder_app_bar.dart';
|
||||
|
||||
class SubtitleEditor extends ConsumerStatefulWidget {
|
||||
const SubtitleEditor({super.key});
|
||||
|
|
@ -27,8 +25,9 @@ class _SubtitleEditorState extends ConsumerState<SubtitleEditor> {
|
|||
final fakeText = context.localized.subtitleConfiguratorPlaceHolder;
|
||||
double lastScale = 0.0;
|
||||
|
||||
return Scaffold(
|
||||
body: Dialog.fullscreen(
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.paddingOf(context).top),
|
||||
child: Dialog.fullscreen(
|
||||
child: GestureDetector(
|
||||
onScaleUpdate: (details) {
|
||||
lastScale = details.scale;
|
||||
|
|
@ -73,7 +72,6 @@ class _SubtitleEditorState extends ConsumerState<SubtitleEditor> {
|
|||
padding: MediaQuery.paddingOf(context),
|
||||
child: Column(
|
||||
children: [
|
||||
if (AdaptiveLayout.of(context).isDesktop) const FladderAppBar(),
|
||||
Row(
|
||||
children: [
|
||||
const BackButton(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue