From 993384e51e8d0a71895ff857a1e89c8232a536d2 Mon Sep 17 00:00:00 2001 From: niuhuan Date: Fri, 14 Oct 2022 23:31:06 +0800 Subject: [PATCH] Listview horizontal resize --- README.md | 19 ++++++++++--------- lib/screens/components/ImageReader.dart | 22 ++++++++-------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index b60b4bd..b29f531 100644 --- a/README.md +++ b/README.md @@ -89,22 +89,23 @@ VPN->代理->分流, 这三个功能如果同时设置, 您会在您手机的VPN ## 请您遵守使用规则 -软件副本分发规则 - -- 本软件仅供学习交流使用, 本软件或本软件的拓展, 个人或企业不可用于商业用途, 不可上架任何商店, 在未经允许的情况下可以自用但不允许释放任何releases。 -- 不要在任何其他 **二次元软件** 的 **聊天社区** 或 **开发社区** 内, 发布有关本软件的链接或信息。 -- 不要发送本软件安装包到 **任何社区内** , 不要将APK/IPA/ZIP/DMG发送包括任何聊天软件内的群聊功能。 分享本软件时, 在社区中使用Github中提供的Releases页面的链接, 或使用私聊窗口发送。 - -拓展包括但是不限于以下内容 +本文中提到的本软件拓展包括但是不限于以下内容 - 使用本软件进行继续开发形成的软件。 - 引入本软件部分内容为依赖/使用本软件内代码的同时包含本软件内一致内容或功能。 - 直接对本软件进行打包发布 -其他 +软件副本分发以及代码使用规则规则 + +- 本软件仅供学习交流使用, 本软件或本软件的拓展, 个人或企业不可用于商业用途, 不可上架任何商店。 +- 本软件的拓展在未经允许的情况下可以自用但不允许释放任何releases。 +- 不要在任何其他 **二次元软件** 的 **聊天社区** 或 **开发社区** 内, 发布有关本软件的链接或信息, 对于观点不同产生的分歧作者不站队任何立场。 +- 不要发送本软件安装包到 **任何社区内** , 不要将APK/IPA/ZIP/DMG发送包括任何聊天软件内的群聊功能。 分享本软件时, 在社区中使用Github中提供的Releases页面的链接, 或使用私聊窗口发送。 + +源代码使用规则 - 对本仓库的fork需要保留本仓库的链接, 以引导用户在主要仓库进行讨论。 责任声明 -- 作者仅分享编程技术, 不分发软件, 不对分发软件承担任何后果。 因传播或下载造成的法律问题或纠纷, 需行为人自行承担, 请您遵守当地法以及副本接受方(社区或人)所在地区的法律。 +- 作者仅分享编程技术, 不分发软件, 不对分发软件承担任何后果。 因传播载造成的法律问题或纠纷, 需行为人自行承担, 请您遵守当地法以及副本接受方(社区或人)所在地区的法律。 diff --git a/lib/screens/components/ImageReader.dart b/lib/screens/components/ImageReader.dart index 02f4095..cdbfd05 100644 --- a/lib/screens/components/ImageReader.dart +++ b/lib/screens/components/ImageReader.dart @@ -1034,9 +1034,8 @@ class _WebToonReaderState extends _ImageReaderContentState { } else { var maxHeight = constraints.maxHeight - super._topBarHeight() - - (widget.struct.fullScreen - ? super._topBarHeight() - : super._bottomBarHeight()); + super._bottomBarHeight() - + MediaQuery.of(context).padding.bottom; renderSize = Size( maxHeight * _trueSizes[index]!.width / @@ -1104,10 +1103,8 @@ class _WebToonReaderState extends _ImageReaderContentState { top: super._topBarHeight(), bottom: widget.pagerDirection == ReaderDirection.TOP_TO_BOTTOM ? 130 // 纵向滚动 底部永远都是130的空白 - : ( // 横向滚动 - widget.struct.fullScreen - ? super._topBarHeight() // 全屏时底部和顶部到屏幕边框距离一样保持美观 - : super._bottomBarHeight()) + : (super._bottomBarHeight() + + MediaQuery.of(context).padding.bottom) // 非全屏时, 顶部去掉顶部BAR的高度, 底部去掉底部BAR的高度, 形成看似填充的效果 , ), @@ -1381,9 +1378,8 @@ class _ListViewReaderState extends _ImageReaderContentState } else { var maxHeight = constraints.maxHeight - super._topBarHeight() - - (widget.struct.fullScreen - ? super._topBarHeight() - : super._bottomBarHeight()); + super._bottomBarHeight() - + MediaQuery.of(context).padding.bottom; renderSize = Size( maxHeight * _trueSizes[index]!.width / @@ -1450,10 +1446,8 @@ class _ListViewReaderState extends _ImageReaderContentState top: super._topBarHeight(), bottom: widget.pagerDirection == ReaderDirection.TOP_TO_BOTTOM ? 130 // 纵向滚动 底部永远都是130的空白 - : ( // 横向滚动 - widget.struct.fullScreen - ? super._topBarHeight() // 全屏时底部和顶部到屏幕边框距离一样保持美观 - : super._bottomBarHeight()) + : (super._bottomBarHeight() + + MediaQuery.of(context).padding.bottom) // 非全屏时, 顶部去掉顶部BAR的高度, 底部去掉底部BAR的高度, 形成看似填充的效果 , ),