mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-20 19:12:04 +00:00
+
This commit is contained in:
parent
385677f67d
commit
abb18202e7
2 changed files with 53 additions and 44 deletions
|
|
@ -736,49 +736,58 @@ class _MangaChapterPageGalleryState
|
|||
builder: (context, ref, child) {
|
||||
final currentIndex = ref
|
||||
.watch(currentIndexProvider(chapter));
|
||||
return Slider(
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(
|
||||
currentIndexProvider(chapter)
|
||||
.notifier)
|
||||
.setCurrentIndex(value.toInt());
|
||||
},
|
||||
onChangeEnd: (newValue) {
|
||||
try {
|
||||
final index = _uChapDataPreload
|
||||
.where((element) =>
|
||||
element.chapter ==
|
||||
chapter &&
|
||||
element.index ==
|
||||
newValue.toInt())
|
||||
.toList()
|
||||
.first
|
||||
.pageIndex;
|
||||
return SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
overlayShape:
|
||||
const RoundSliderOverlayShape(
|
||||
overlayRadius: 5.0),
|
||||
),
|
||||
child: Slider(
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(currentIndexProvider(
|
||||
chapter)
|
||||
.notifier)
|
||||
.setCurrentIndex(value.toInt());
|
||||
},
|
||||
onChangeEnd: (newValue) {
|
||||
try {
|
||||
final index = _uChapDataPreload
|
||||
.where((element) =>
|
||||
element.chapter ==
|
||||
chapter &&
|
||||
element.index ==
|
||||
newValue.toInt())
|
||||
.toList()
|
||||
.first
|
||||
.pageIndex;
|
||||
|
||||
_onBtnTapped(
|
||||
index!,
|
||||
true,
|
||||
isSlide: true,
|
||||
);
|
||||
} catch (_) {}
|
||||
},
|
||||
divisions:
|
||||
_readerController.getPageLength(
|
||||
_chapterUrlModel.pageUrls) -
|
||||
1,
|
||||
value: min(
|
||||
currentIndex.toDouble(),
|
||||
_readerController
|
||||
.getPageLength(
|
||||
_chapterUrlModel.pageUrls)
|
||||
.toDouble()),
|
||||
label: '${currentIndex + 1}',
|
||||
min: 0,
|
||||
max: (_readerController.getPageLength(
|
||||
_chapterUrlModel.pageUrls) -
|
||||
1)
|
||||
.toDouble(),
|
||||
_onBtnTapped(
|
||||
index!,
|
||||
true,
|
||||
isSlide: true,
|
||||
);
|
||||
} catch (_) {}
|
||||
},
|
||||
divisions:
|
||||
_readerController.getPageLength(
|
||||
_chapterUrlModel
|
||||
.pageUrls) -
|
||||
1,
|
||||
value: min(
|
||||
currentIndex.toDouble(),
|
||||
_readerController
|
||||
.getPageLength(
|
||||
_chapterUrlModel.pageUrls)
|
||||
.toDouble()),
|
||||
label: '${currentIndex + 1}',
|
||||
min: 0,
|
||||
max: (_readerController.getPageLength(
|
||||
_chapterUrlModel
|
||||
.pageUrls) -
|
||||
1)
|
||||
.toDouble(),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class ReaderScreen extends ConsumerWidget {
|
|||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(l10n.reading_mode),
|
||||
title: Text(l10n.background_color),
|
||||
content: SizedBox(
|
||||
width: mediaWidth(context, 0.8),
|
||||
child: ListView.builder(
|
||||
|
|
@ -203,7 +203,7 @@ class ReaderScreen extends ConsumerWidget {
|
|||
);
|
||||
});
|
||||
},
|
||||
title: Text(l10n.reading_mode),
|
||||
title: Text(l10n.background_color),
|
||||
subtitle: Text(
|
||||
getBackgroundColorName(backgroundColor, context),
|
||||
style: TextStyle(fontSize: 11, color: secondaryColor(context)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue