viewer: fixed loading background for video cover
This commit is contained in:
parent
0431164ca6
commit
9a35e6e1d2
2 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ class RasterImageThumbnail extends StatefulWidget {
|
|||
final AvesEntry entry;
|
||||
final double extent;
|
||||
final BoxFit fit;
|
||||
final bool showLoadingBackground;
|
||||
final ValueNotifier<bool>? cancellableNotifier;
|
||||
final Object? heroTag;
|
||||
|
||||
|
@ -22,6 +23,7 @@ class RasterImageThumbnail extends StatefulWidget {
|
|||
required this.entry,
|
||||
required this.extent,
|
||||
this.fit = BoxFit.cover,
|
||||
this.showLoadingBackground = true,
|
||||
this.cancellableNotifier,
|
||||
this.heroTag,
|
||||
}) : super(key: key);
|
||||
|
@ -174,7 +176,7 @@ class _RasterImageThumbnailState extends State<RasterImageThumbnail> {
|
|||
final imageInfo = _lastImageInfo;
|
||||
final image = imageInfo == null
|
||||
? Container(
|
||||
color: backgroundColor,
|
||||
color: widget.showLoadingBackground ? backgroundColor : Colors.transparent,
|
||||
width: extent,
|
||||
height: extent,
|
||||
)
|
||||
|
|
|
@ -216,6 +216,7 @@ class _EntryPageViewState extends State<EntryPageView> {
|
|||
entry: entry,
|
||||
extent: context.select<MediaQueryData, double>((mq) => mq.size.shortestSide),
|
||||
fit: BoxFit.contain,
|
||||
showLoadingBackground: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue