diff --git a/lib/components/thumbnail.dart b/lib/components/thumbnail.dart index 7e5ccb8..be2309c 100644 --- a/lib/components/thumbnail.dart +++ b/lib/components/thumbnail.dart @@ -56,14 +56,18 @@ class Thumbnail extends StatefulWidget { int get height => _height != null ? _height! - : _pMeta.height > _pMeta.width - ? _max - : _max * _pMeta.height ~/ _pMeta.width; + : _width != null + ? _width! * _pMeta.height ~/ _pMeta.width + : _pMeta.height > _pMeta.width + ? _max + : _max * _pMeta.height ~/ _pMeta.width; int get width => _width != null ? _width! - : _pMeta.width > _pMeta.height - ? _max - : _max * _pMeta.width ~/ _pMeta.height; + : _height != null + ? _height! * _pMeta.width ~/ _pMeta.height + : _pMeta.width > _pMeta.height + ? _max + : _max * _pMeta.width ~/ _pMeta.height; @override State createState() => _Thumbnail();