chore: Follow up image viewer
This commit is contained in:
parent
f7bf273c17
commit
b2131e65e5
2 changed files with 15 additions and 10 deletions
|
|
@ -2820,5 +2820,6 @@
|
||||||
"pleaseFillOut": "Please fill out",
|
"pleaseFillOut": "Please fill out",
|
||||||
"invalidUrl": "Invalid url",
|
"invalidUrl": "Invalid url",
|
||||||
"addLink": "Add link",
|
"addLink": "Add link",
|
||||||
"unableToJoinChat": "Unable to join chat. Maybe the other party has already closed the conversation."
|
"unableToJoinChat": "Unable to join chat. Maybe the other party has already closed the conversation.",
|
||||||
|
"previous": "Previous"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,7 @@ class ImageViewerView extends StatelessWidget {
|
||||||
padding: const EdgeInsets.only(right: 8.0),
|
padding: const EdgeInsets.only(right: 8.0),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) => IconButton(
|
builder: (context) => IconButton(
|
||||||
style: IconButton.styleFrom(
|
style: iconButtonStyle,
|
||||||
backgroundColor: Colors.black.withAlpha(128),
|
|
||||||
),
|
|
||||||
onPressed: () => controller.shareFileAction(context),
|
onPressed: () => controller.shareFileAction(context),
|
||||||
tooltip: L10n.of(context).share,
|
tooltip: L10n.of(context).share,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
@ -82,12 +80,16 @@ class ImageViewerView extends StatelessWidget {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: controller.allEvents[i].eventId,
|
tag: controller.allEvents[i].eventId,
|
||||||
child: MxcImage(
|
child: GestureDetector(
|
||||||
key: ValueKey(controller.allEvents[i].eventId),
|
// Ignore taps to not go back here:
|
||||||
event: controller.allEvents[i],
|
onTap: () {},
|
||||||
fit: BoxFit.contain,
|
child: MxcImage(
|
||||||
isThumbnail: false,
|
key: ValueKey(controller.allEvents[i].eventId),
|
||||||
animated: true,
|
event: controller.allEvents[i],
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
isThumbnail: false,
|
||||||
|
animated: true,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -100,6 +102,7 @@ class ImageViewerView extends StatelessWidget {
|
||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(12.0),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
style: iconButtonStyle,
|
style: iconButtonStyle,
|
||||||
|
tooltip: L10n.of(context).previous,
|
||||||
icon: const Icon(Icons.chevron_left_outlined),
|
icon: const Icon(Icons.chevron_left_outlined),
|
||||||
onPressed: () => controller.pageController.previousPage(
|
onPressed: () => controller.pageController.previousPage(
|
||||||
duration: FluffyThemes.animationDuration,
|
duration: FluffyThemes.animationDuration,
|
||||||
|
|
@ -115,6 +118,7 @@ class ImageViewerView extends StatelessWidget {
|
||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(12.0),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
style: iconButtonStyle,
|
style: iconButtonStyle,
|
||||||
|
tooltip: L10n.of(context).next,
|
||||||
icon: const Icon(Icons.chevron_right_outlined),
|
icon: const Icon(Icons.chevron_right_outlined),
|
||||||
onPressed: () => controller.pageController.nextPage(
|
onPressed: () => controller.pageController.nextPage(
|
||||||
duration: FluffyThemes.animationDuration,
|
duration: FluffyThemes.animationDuration,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue