diff --git a/lib/components/navigation_bar.dart b/lib/components/navigation_bar.dart index 21761cd..07c43ef 100644 --- a/lib/components/navigation_bar.dart +++ b/lib/components/navigation_bar.dart @@ -172,6 +172,16 @@ class NaviPaneState extends State @override Widget build(BuildContext context) { onRebuild(context); + final mq = MediaQuery.of(context); + final sideInsets = + (App.isMobile && mq.orientation == Orientation.landscape) + ? EdgeInsets.only( + left: math.max( + mq.viewPadding.left, mq.systemGestureInsets.left), + right: math.max( + mq.viewPadding.right, mq.systemGestureInsets.right), + ) + : EdgeInsets.zero; return _NaviPopScope( action: () { if (App.mainNavigatorKey!.currentState!.canPop()) { @@ -185,7 +195,7 @@ class NaviPaneState extends State animation: controller, builder: (context, child) { final value = controller.value; - return Stack( + Widget content = Stack( children: [ Positioned( left: _kFoldedSideBarWidth * ((value - 2.0).clamp(-1.0, 0.0)), @@ -202,6 +212,13 @@ class NaviPaneState extends State ), ], ); + if (sideInsets != EdgeInsets.zero) { + content = Padding( + padding: sideInsets, + child: content, + ); + } + return content; }, ), ); diff --git a/lib/pages/reader/images.dart b/lib/pages/reader/images.dart index b1530f4..7bbcbf2 100644 --- a/lib/pages/reader/images.dart +++ b/lib/pages/reader/images.dart @@ -286,8 +286,9 @@ class _GalleryModeState extends State<_GalleryMode> ); } + final viewportSize = MediaQuery.of(context).size; return PhotoViewGalleryPageOptions.customChild( - childSize: reader.size * 2, + childSize: viewportSize, controller: photoViewControllers[index], minScale: PhotoViewComputedScale.contained * 1.0, maxScale: PhotoViewComputedScale.covered * 10.0, diff --git a/lib/pages/reader/scaffold.dart b/lib/pages/reader/scaffold.dart index 336a96b..ec731a5 100644 --- a/lib/pages/reader/scaffold.dart +++ b/lib/pages/reader/scaffold.dart @@ -166,40 +166,49 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> { decoration: BoxDecoration( color: context.colorScheme.surface.toOpacity(0.92), border: Border( - bottom: BorderSide(color: Colors.grey.toOpacity(0.5), width: 0.5), + bottom: BorderSide( + color: Colors.grey.toOpacity(0.5), + width: 0.5, + ), ), ), - child: Row( - children: [ - const SizedBox(width: 8), - const BackButton(), - const SizedBox(width: 8), - Expanded( - child: Text( - context.reader.widget.name, - style: ts.s18, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - const SizedBox(width: 8), - if (shouldShowChapterComments()) - Tooltip( - message: "Chapter Comments".tl, - child: IconButton( - icon: const Icon(Icons.comment), - onPressed: openChapterComments, + child: Padding( + padding: EdgeInsets.only( + left: context.padding.left, + right: context.padding.right, + ), + child: Row( + children: [ + const SizedBox(width: 8), + const BackButton(), + const SizedBox(width: 8), + Expanded( + child: Text( + context.reader.widget.name, + style: ts.s18, + maxLines: 1, + overflow: TextOverflow.ellipsis, ), ), - Tooltip( - message: "Settings".tl, - child: IconButton( - icon: const Icon(Icons.settings), - onPressed: openSetting, + const SizedBox(width: 8), + if (shouldShowChapterComments()) + Tooltip( + message: "Chapter Comments".tl, + child: IconButton( + icon: const Icon(Icons.comment), + onPressed: openChapterComments, + ), + ), + Tooltip( + message: "Settings".tl, + child: IconButton( + icon: const Icon(Icons.settings), + onPressed: openSetting, + ), ), - ), - const SizedBox(width: 8), - ], + const SizedBox(width: 8), + ], + ), ), ), ); @@ -520,7 +529,13 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> { : null, ), padding: EdgeInsets.only(bottom: context.padding.bottom), - child: child, + child: Padding( + padding: EdgeInsets.only( + left: context.padding.left, + right: context.padding.right, + ), + child: child, + ), ), ); } @@ -713,11 +728,12 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> { } Widget buildEpChangeButton() { + final extraWidth = context.padding.left + context.padding.right; if (context.reader.widget.chapters == null) return const SizedBox(); switch (showFloatingButtonValue) { case 0: return Container( - width: 58, + width: 58 + extraWidth, height: 58, clipBehavior: Clip.antiAlias, decoration: BoxDecoration( @@ -735,7 +751,7 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> { case -1: case 1: return SizedBox( - width: 58, + width: 58 + extraWidth, height: 58, child: Material( color: Theme.of(context).colorScheme.primaryContainer, diff --git a/lib/pages/settings/setting_components.dart b/lib/pages/settings/setting_components.dart index f70e7d1..9fab26f 100644 --- a/lib/pages/settings/setting_components.dart +++ b/lib/pages/settings/setting_components.dart @@ -385,17 +385,16 @@ class _SliderSettingState extends State<_SliderSetting> { : appdata.settings.getReaderSetting( widget.comicId!, widget.comicSource!, - widget.settingsIndex, - )) + widget.settingsIndex, + )) .toDouble(); return ListTile( - title: Row( - children: [ - Text(widget.title), - const Spacer(), - Text(value.toString(), style: ts.s12), - ], + title: Text( + widget.title, + softWrap: true, + maxLines: 2, ), + trailing: Text(value.toString(), style: ts.s12), subtitle: Slider( value: value, onChanged: (value) {