Tweak memory view in photos tab

This commit is contained in:
Ming Ming 2024-07-17 00:00:13 +08:00
parent 4672e17acc
commit 63eb4d6c88

View file

@ -214,7 +214,7 @@ class _MemoryCollectionList extends StatelessWidget {
class _MemoryCollectionItemView extends StatelessWidget { class _MemoryCollectionItemView extends StatelessWidget {
static const width = 96.0; static const width = 96.0;
static const height = width * 1.15; static const height = 128.0;
const _MemoryCollectionItemView({ const _MemoryCollectionItemView({
required this.coverUrl, required this.coverUrl,
@ -234,10 +234,17 @@ class _MemoryCollectionItemView extends StatelessWidget {
child: Stack( child: Stack(
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
PhotoListImage( OverflowBox(
account: context.bloc.account, maxHeight: height,
previewUrl: coverUrl, maxWidth: height,
padding: const EdgeInsets.all(0), child: SizedBox.square(
dimension: height,
child: PhotoListImage(
account: context.bloc.account,
previewUrl: coverUrl,
padding: const EdgeInsets.all(0),
),
),
), ),
Positioned.fill( Positioned.fill(
child: Container( child: Container(
@ -257,7 +264,7 @@ class _MemoryCollectionItemView extends StatelessWidget {
padding: const EdgeInsets.all(4), padding: const EdgeInsets.all(4),
child: Text( child: Text(
label, label,
style: Theme.of(context).textTheme.labelLarge!.copyWith( style: Theme.of(context).textTheme.labelMedium?.copyWith(
color: Theme.of(context).onDarkSurface, color: Theme.of(context).onDarkSurface,
), ),
), ),