From 1fa8a54f99db938df1faab861f77d3857ba7a0c1 Mon Sep 17 00:00:00 2001 From: Shawn Date: Wed, 21 Dec 2022 10:56:39 -0700 Subject: [PATCH] Restore previous image sizing in photo gallery --- lib/ui/screens/photo_gallery/photo_gallery.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ui/screens/photo_gallery/photo_gallery.dart b/lib/ui/screens/photo_gallery/photo_gallery.dart index aa6541bb..bb728ee6 100644 --- a/lib/ui/screens/photo_gallery/photo_gallery.dart +++ b/lib/ui/screens/photo_gallery/photo_gallery.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:flutter/cupertino.dart'; import 'package:wonders/common_libs.dart'; import 'package:wonders/logic/data/unsplash_photo_data.dart'; import 'package:wonders/ui/common/controls/app_loading_indicator.dart'; @@ -136,7 +135,9 @@ class _PhotoGalleryState extends State { return Center(child: AppLoadingIndicator()); } - Size imgSize = Size(context.widthPx * .5, context.heightPx * .5); + Size imgSize = context.isLandscape + ? Size(context.widthPx * .5, context.heightPx * .66) + : Size(context.widthPx * .66, context.heightPx * .5); imgSize = (widget.imageSize ?? imgSize) * _scale; // Get transform offset for the current _index final padding = $styles.insets.md;