Skip to content

Commit

Permalink
fix: fixed manga page loader size
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanYuuki committed Dec 1, 2024
1 parent ab9253b commit ef37c67
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 28 deletions.
51 changes: 29 additions & 22 deletions lib/pages/Android/Manga/read_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,12 @@ class _ReadingPageState extends State<ReadingPage> {
imageUrl: imageData['image'],
fit: BoxFit.contain,
progressIndicatorBuilder: (context, url, progress) =>
Center(
child: CircularProgressIndicator(
value: progress.progress,
SizedBox(
height: MediaQuery.of(context).size.height,
child: Center(
child: CircularProgressIndicator(
value: progress.progress,
),
),
),
errorWidget: (context, url, error) =>
Expand Down Expand Up @@ -349,9 +352,12 @@ class _ReadingPageState extends State<ReadingPage> {
return CachedNetworkImage(
imageUrl: imageData['image'],
fit: BoxFit.contain,
progressIndicatorBuilder: (context, url, progress) => Center(
child: CircularProgressIndicator(
value: progress.progress,
progressIndicatorBuilder: (context, url, progress) => SizedBox(
height: MediaQuery.of(context).size.height,
child: Center(
child: CircularProgressIndicator(
value: progress.progress,
),
),
),
errorWidget: (context, url, error) => const Icon(Icons.error),
Expand Down Expand Up @@ -427,22 +433,23 @@ class _ReadingPageState extends State<ReadingPage> {
],
),
),
TileWithSlider(
title: 'Image Width',
sliderValue: imageWidthFactor,
onChanged: (double value) {
setModalState(() {
imageWidthFactor = value;
});
setState(() {});
},
description: 'Only Works with webtoon mode',
icon: Icons.image_aspect_ratio_rounded,
min: 0.5,
max: 1.5,
divisions: 10,
),
if (!Platform.isAndroid)
if (!Platform.isAndroid && !Platform.isIOS)
TileWithSlider(
title: 'Image Width',
sliderValue: imageWidthFactor,
onChanged: (double value) {
setModalState(() {
imageWidthFactor = value;
});
setState(() {});
},
description: 'Only Works with webtoon mode',
icon: Icons.image_aspect_ratio_rounded,
min: 0.5,
max: 1.5,
divisions: 10,
),
if (!Platform.isAndroid && !Platform.isIOS)
TileWithSlider(
title: 'Scroll Multiplier',
sliderValue: scrollMultiplier,
Expand Down
12 changes: 11 additions & 1 deletion lib/pages/Android/user/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:anymex/pages/Android/user/settings/settings_about.dart';
import 'package:anymex/pages/Android/user/settings/settings_download.dart';
import 'package:anymex/pages/Android/user/settings/settings_layout.dart';
import 'package:anymex/pages/Android/user/settings/settings_player.dart';
import 'package:anymex/pages/Android/user/settings/settings_sources.dart';
import 'package:anymex/pages/Android/user/settings/settings_theme.dart';
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
Expand Down Expand Up @@ -58,6 +59,15 @@ class SettingsPage extends StatelessWidget {
),
),
const SizedBox(height: 30),
CustomTile(
icon: Icons.source_rounded,
title: 'Source',
description: 'Source related settings',
onTap: () {
Navigator.push(
context, _createSlideRoute(const SettingsSources()));
},
),
CustomTile(
icon: HugeIcons.strokeRoundedPaintBrush02,
title: 'UI',
Expand All @@ -67,7 +77,7 @@ class SettingsPage extends StatelessWidget {
},
),
CustomTile(
icon: Icons.source,
icon: Icons.download,
title: 'Downloads',
description: 'Tweak Download Settings',
onTap: () {
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/Android/user/settings/settings_download.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class _SettingsDownloadState extends State<SettingsDownload> {
IconButton(
onPressed: () {},
icon: const Icon(
Icons.source,
Icons.download,
size: 40,
))
],
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/Android/user/settings/settings_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class _LayoutPageState extends State<LayoutPage> {
fontSize: 12,
color: Theme.of(context).colorScheme.primary)),
),
if (Platform.isAndroid) ...[
if (Platform.isAndroid && Platform.isIOS) ...[
SwitchTileStateless(
icon: Iconsax.card5,
title: 'Compact Card',
Expand Down Expand Up @@ -121,7 +121,7 @@ class _LayoutPageState extends State<LayoutPage> {
builder: (context) => const ResizeTabbar()));
},
),
if (Platform.isAndroid)
if (Platform.isAndroid && Platform.isIOS)
TileWithSlider(
sliderValue: cardRoundness,
onChanged: (newValue) {
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/Android/user/settings/settings_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class _VideoPlayerSettingsState extends State<VideoPlayerSettings> {
onTap: _showPlaybackSpeedDialog,
),
// Resize Mode
if (Platform.isAndroid) ...[
if (Platform.isAndroid && Platform.isIOS) ...[
ListTile(
leading: Icon(Icons.aspect_ratio,
color: Theme.of(context).colorScheme.primary),
Expand Down Expand Up @@ -353,7 +353,7 @@ class _VideoPlayerSettingsState extends State<VideoPlayerSettings> {
},
),
// Subtitle Outline Color
if (Platform.isAndroid) ...[
if (Platform.isAndroid && Platform.isIOS) ...[
ListTile(
leading: Icon(Icons.palette,
color: Theme.of(context).colorScheme.primary),
Expand Down

0 comments on commit ef37c67

Please sign in to comment.