mirror of
https://github.com/immich-app/immich.git
synced 2025-02-15 19:36:04 +02:00
fix issue #13804 Co-authored-by: dvbthien <dvbthien@gmail.com>
This commit is contained in:
parent
318ab756cb
commit
30d42e571c
@ -136,12 +136,33 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
tag: isFromDto
|
tag: isFromDto
|
||||||
? '${asset.remoteId}-$heroOffset'
|
? '${asset.remoteId}-$heroOffset'
|
||||||
: asset.id + heroOffset,
|
: asset.id + heroOffset,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
SizedBox.expand(
|
||||||
child: ImmichThumbnail(
|
child: ImmichThumbnail(
|
||||||
asset: asset,
|
asset: asset,
|
||||||
height: 250,
|
height: 250,
|
||||||
width: 250,
|
width: 250,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color.fromRGBO(0, 0, 0, 0.1),
|
||||||
|
Colors.transparent,
|
||||||
|
Colors.transparent,
|
||||||
|
Color.fromRGBO(0, 0, 0, 0.1),
|
||||||
|
],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
stops: [0, 0.3, 0.6, 1],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
if (!multiselectEnabled || !isSelected) {
|
if (!multiselectEnabled || !isSelected) {
|
||||||
return image;
|
return image;
|
||||||
@ -151,11 +172,8 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
color: canDeselect ? assetContainerColor : Colors.grey,
|
color: canDeselect ? assetContainerColor : Colors.grey,
|
||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.all(
|
||||||
topRight: Radius.circular(15.0),
|
Radius.circular(15.0),
|
||||||
bottomRight: Radius.circular(15.0),
|
|
||||||
bottomLeft: Radius.circular(15.0),
|
|
||||||
topLeft: Radius.zero,
|
|
||||||
),
|
),
|
||||||
child: image,
|
child: image,
|
||||||
),
|
),
|
||||||
@ -175,16 +193,9 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
)
|
)
|
||||||
: const Border(),
|
: const Border(),
|
||||||
),
|
),
|
||||||
child: buildImage(),
|
child: Stack(
|
||||||
),
|
children: [
|
||||||
if (multiselectEnabled)
|
buildImage(),
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(3.0),
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.topLeft,
|
|
||||||
child: buildSelectionIcon(asset),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (showStorageIndicator)
|
if (showStorageIndicator)
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 8,
|
right: 8,
|
||||||
@ -202,12 +213,23 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.favorite,
|
Icons.favorite,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
size: 18,
|
size: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!asset.isImage) buildVideoIcon(),
|
if (!asset.isImage) buildVideoIcon(),
|
||||||
if (asset.stackCount > 0) buildStackIcon(),
|
if (asset.stackCount > 0) buildStackIcon(),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (multiselectEnabled)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(3.0),
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: buildSelectionIcon(asset),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user