mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-21 03:32:06 +00:00
+
This commit is contained in:
parent
edd05f3eb6
commit
202aa97527
17 changed files with 72 additions and 26 deletions
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "حجم الخط",
|
||||
"text": "النص",
|
||||
"border": "الحدود",
|
||||
"background": "الخلفية"
|
||||
"background": "الخلفية",
|
||||
"no_subtite_warning_message": "لا تؤثر لأنه لا توجد مسارات ترجمة في هذا الفيديو"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Schriftgröße",
|
||||
"text": "Text",
|
||||
"border": "Rand",
|
||||
"background": "Hintergrund"
|
||||
"background": "Hintergrund",
|
||||
"no_subtite_warning_message": "Hat keine Wirkung, da in diesem Video keine Untertitelspuren vorhanden sind"
|
||||
}
|
||||
|
|
@ -318,5 +318,6 @@
|
|||
"font_size": "Font size",
|
||||
"text": "Text",
|
||||
"border": "Border",
|
||||
"background": "Background"
|
||||
"background": "Background",
|
||||
"no_subtite_warning_message": "Has no effect because there aren't any subtitle tracks in this video"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Tamaño de fuente",
|
||||
"text": "Texto",
|
||||
"border": "Borde",
|
||||
"background": "Fondo"
|
||||
"background": "Fondo",
|
||||
"no_subtite_warning_message": "No tiene efecto porque no hay pistas de subtítulos en este vídeo"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Tamaño de fuente",
|
||||
"text": "Texto",
|
||||
"border": "Borde",
|
||||
"background": "Fondo"
|
||||
"background": "Fondo",
|
||||
"no_subtite_warning_message": "No tiene efecto porque no hay pistas de subtítulos en este video"
|
||||
}
|
||||
|
|
@ -317,5 +317,6 @@
|
|||
"font_size": "Taille de police",
|
||||
"text": "Texte",
|
||||
"border": "Bordure",
|
||||
"background": "Arrière-plan"
|
||||
"background": "Arrière-plan",
|
||||
"no_subtite_warning_message": "N'a aucun effet car il n'y a pas de pistes de sous-titres dans cette vidéo"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Ukuran Huruf",
|
||||
"text": "Teks",
|
||||
"border": "Batas",
|
||||
"background": "Latar Belakang"
|
||||
"background": "Latar Belakang",
|
||||
"no_subtite_warning_message": "Tidak berpengaruh karena tidak ada trek subtitle dalam video ini"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Dimensione del carattere",
|
||||
"text": "Testo",
|
||||
"border": "Bordo",
|
||||
"background": "Sfondo"
|
||||
"background": "Sfondo",
|
||||
"no_subtite_warning_message": "Non ha effetto perché non ci sono tracce sottotitoli in questo video"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Tamanho da fonte",
|
||||
"text": "Texto",
|
||||
"border": "Borda",
|
||||
"background": "Fundo"
|
||||
"background": "Fundo",
|
||||
"no_subtite_warning_message": "Não tem efeito porque não há faixas de legendas neste vídeo"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Tamanho da fonte",
|
||||
"text": "Texto",
|
||||
"border": "Borda",
|
||||
"background": "Fundo"
|
||||
"background": "Fundo",
|
||||
"no_subtite_warning_message": "Não tem efeito porque não há faixas de legenda neste vídeo"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Размер шрифта",
|
||||
"text": "Текст",
|
||||
"border": "Граница",
|
||||
"background": "Фон"
|
||||
"background": "Фон",
|
||||
"no_subtite_warning_message": "Не имеет эффекта, потому что в этом видео нет субтитров"
|
||||
}
|
||||
|
|
@ -316,5 +316,6 @@
|
|||
"font_size": "Yazı Boyutu",
|
||||
"text": "Metin",
|
||||
"border": "Kenarlık",
|
||||
"background": "Arka Plan"
|
||||
"background": "Arka Plan",
|
||||
"no_subtite_warning_message": "Bu videoda altyazı parçaları olmadığı için etkisi yok"
|
||||
}
|
||||
|
|
@ -318,5 +318,6 @@
|
|||
"font_size": "字号",
|
||||
"text": "文本",
|
||||
"border": "边框",
|
||||
"background": "背景"
|
||||
"background": "背景",
|
||||
"no_subtite_warning_message": "由于此视频中没有字幕轨道,因此无效。"
|
||||
}
|
||||
|
|
@ -365,6 +365,7 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
|
||||
void _videoSettingDraggableMenu(BuildContext context) async {
|
||||
final l10n = l10nLocalizations(context)!;
|
||||
bool hasSubtitleTrack = false;
|
||||
_player.pause();
|
||||
await customDraggableTabBar(
|
||||
tabs: [
|
||||
|
|
@ -374,7 +375,7 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
],
|
||||
children: [
|
||||
_videoQualityWidget(context),
|
||||
_videoSubtitle(context),
|
||||
_videoSubtitle(context, (value) => hasSubtitleTrack = value),
|
||||
_videoAudios(context)
|
||||
],
|
||||
context: context,
|
||||
|
|
@ -386,8 +387,8 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
const Tab(text: "Font"),
|
||||
const Tab(text: "Color"),
|
||||
], children: [
|
||||
const FontSettingWidget(),
|
||||
const ColorSettingWidget()
|
||||
FontSettingWidget(hasSubtitleTrack: hasSubtitleTrack),
|
||||
ColorSettingWidget(hasSubtitleTrack: hasSubtitleTrack)
|
||||
], context: context, vsync: this, fullWidth: true);
|
||||
if (context.mounted) {
|
||||
Navigator.pop(context);
|
||||
|
|
@ -399,7 +400,7 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
_player.play();
|
||||
}
|
||||
|
||||
Widget _videoSubtitle(BuildContext context) {
|
||||
Widget _videoSubtitle(BuildContext context, Function(bool) hasSubtitleTrack) {
|
||||
List<VideoPrefs> videoSubtitle = _player.state.tracks.subtitle
|
||||
.toList()
|
||||
.map((e) => VideoPrefs(isLocal: true, subtitle: e))
|
||||
|
|
@ -433,6 +434,7 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
.where((element) => element.title!.isNotEmpty)
|
||||
.toList();
|
||||
videoSubtitle.sort((a, b) => a.title!.compareTo(b.title!));
|
||||
hasSubtitleTrack.call(videoSubtitle.isNotEmpty);
|
||||
videoSubtitle.insert(
|
||||
0, VideoPrefs(isLocal: false, subtitle: SubtitleTrack.no()));
|
||||
List<VideoPrefs> videoSubtitleLast = [];
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import 'package:mangayomi/providers/l10n_providers.dart';
|
|||
import 'package:mangayomi/utils/extensions/build_context_extensions.dart';
|
||||
|
||||
class FontSettingWidget extends ConsumerStatefulWidget {
|
||||
const FontSettingWidget({super.key});
|
||||
final bool hasSubtitleTrack;
|
||||
const FontSettingWidget({super.key, required this.hasSubtitleTrack});
|
||||
|
||||
@override
|
||||
ConsumerState<FontSettingWidget> createState() => _FontSettingWidgetState();
|
||||
|
|
@ -22,6 +23,22 @@ class _FontSettingWidgetState extends ConsumerState<FontSettingWidget> {
|
|||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
children: [
|
||||
if (!widget.hasSubtitleTrack)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(2),
|
||||
child: Icon(Icons.info_outline_rounded, size: 14),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(context.l10n.no_subtite_warning_message),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
|
@ -117,7 +134,8 @@ class _FontSettingWidgetState extends ConsumerState<FontSettingWidget> {
|
|||
}
|
||||
|
||||
class ColorSettingWidget extends ConsumerStatefulWidget {
|
||||
const ColorSettingWidget({super.key});
|
||||
final bool hasSubtitleTrack;
|
||||
const ColorSettingWidget({super.key, required this.hasSubtitleTrack});
|
||||
|
||||
@override
|
||||
ConsumerState<ColorSettingWidget> createState() => _ColorSettingWidgetState();
|
||||
|
|
@ -182,6 +200,22 @@ class _ColorSettingWidgetState extends ConsumerState<ColorSettingWidget> {
|
|||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
children: [
|
||||
if (!widget.hasSubtitleTrack)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(2),
|
||||
child: Icon(Icons.info_outline_rounded, size: 14),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(context.l10n.no_subtite_warning_message),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(flex: 3, child: button(context.l10n.text, textColor)),
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@ TextStyle subtileTextStyle(WidgetRef ref) {
|
|||
fontFamily: "",
|
||||
shadows: [
|
||||
Shadow(
|
||||
offset: const Offset(-3, -3), color: borderColor),
|
||||
offset: const Offset(-1.5, -1.5), color: borderColor, blurRadius: 1.4),
|
||||
Shadow(
|
||||
offset: const Offset(3, -3), color: borderColor),
|
||||
Shadow(offset: const Offset(3, 3), color: borderColor),
|
||||
Shadow(offset: const Offset(-3, 3), color: borderColor)
|
||||
offset: const Offset(1.5, -1.5), color: borderColor, blurRadius: 1.4),
|
||||
Shadow(offset: const Offset(1.5, 1.5), color: borderColor, blurRadius: 1.4),
|
||||
Shadow(offset: const Offset(-1.5, 1.5), color: borderColor, blurRadius: 1.4)
|
||||
],
|
||||
backgroundColor: Color.fromARGB(
|
||||
subSets.backgroundColorA!,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:draggable_menu/draggable_menu.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
|
@ -93,7 +91,6 @@ Future<void> customDraggableTabBar(
|
|||
);
|
||||
},
|
||||
);
|
||||
log(widgetsHeight.toString());
|
||||
widgetsHeight
|
||||
.sort((a, b) => (a["height"] as double).compareTo(b["height"] as double));
|
||||
if (context.mounted) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue