mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: image view
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -232,6 +232,8 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
|
|||||||
itemCount: widget.sources.length,
|
itemCount: widget.sources.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: Get.back,
|
||||||
onDoubleTapDown: (TapDownDetails details) {
|
onDoubleTapDown: (TapDownDetails details) {
|
||||||
_doubleTapLocalPosition = details.localPosition;
|
_doubleTapLocalPosition = details.localPosition;
|
||||||
},
|
},
|
||||||
@@ -351,12 +353,7 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _itemBuilder(sources, index) {
|
Widget _itemBuilder(sources, index) {
|
||||||
return GestureDetector(
|
return Center(
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () {
|
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: sources[index],
|
tag: sources[index],
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
@@ -367,10 +364,11 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
|
|||||||
: sources[index],
|
: sources[index],
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
progressIndicatorBuilder: (context, url, progress) {
|
progressIndicatorBuilder: (context, url, progress) {
|
||||||
return Container(
|
return Center(
|
||||||
|
child: SizedBox(
|
||||||
width: 150.0,
|
width: 150.0,
|
||||||
alignment: Alignment.center,
|
|
||||||
child: LinearProgressIndicator(value: progress.progress ?? 0),
|
child: LinearProgressIndicator(value: progress.progress ?? 0),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
errorListener: (value) {
|
errorListener: (value) {
|
||||||
@@ -382,7 +380,6 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,9 +102,10 @@ class _ActionPanelState extends State<ActionPanel> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
icon: Icon(
|
||||||
FontAwesomeIcons.shareFromSquare,
|
FontAwesomeIcons.shareFromSquare,
|
||||||
size: 16,
|
size: 16,
|
||||||
|
color: color,
|
||||||
semanticLabel: "转发",
|
semanticLabel: "转发",
|
||||||
),
|
),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
@@ -119,9 +120,10 @@ class _ActionPanelState extends State<ActionPanel> {
|
|||||||
child: TextButton.icon(
|
child: TextButton.icon(
|
||||||
onPressed: () => _dynamicsController.pushDetail(widget.item, 1,
|
onPressed: () => _dynamicsController.pushDetail(widget.item, 1,
|
||||||
action: 'comment'),
|
action: 'comment'),
|
||||||
icon: const Icon(
|
icon: Icon(
|
||||||
FontAwesomeIcons.comment,
|
FontAwesomeIcons.comment,
|
||||||
size: 16,
|
size: 16,
|
||||||
|
color: color,
|
||||||
semanticLabel: "评论",
|
semanticLabel: "评论",
|
||||||
),
|
),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
|
|||||||
@@ -82,16 +82,17 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
|
|||||||
double width = box.maxWidth;
|
double width = box.maxWidth;
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Hero(
|
// Hero(
|
||||||
tag: content.bvid,
|
// tag: content.bvid,
|
||||||
child: NetworkImgLayer(
|
// child:
|
||||||
|
NetworkImgLayer(
|
||||||
type: null,
|
type: null,
|
||||||
width: width,
|
width: width,
|
||||||
height: width / StyleString.aspectRatio,
|
height: width / StyleString.aspectRatio,
|
||||||
src: content.cover,
|
src: content.cover,
|
||||||
semanticsLabel: content.title,
|
semanticsLabel: content.title,
|
||||||
),
|
),
|
||||||
),
|
// ),
|
||||||
if (content.badge != null && type == 'pgc')
|
if (content.badge != null && type == 'pgc')
|
||||||
PBadge(
|
PBadge(
|
||||||
text: content.badge['text'],
|
text: content.badge['text'],
|
||||||
|
|||||||
Reference in New Issue
Block a user