Improved implementation of border of AlbumListItem + minor layout change in CreateCollecitonSheet
This commit is contained in:
parent
1f347ec46a
commit
97805cebb9
|
@ -22,6 +22,8 @@ class AlbumListItemWidget extends StatelessWidget {
|
|||
final textTheme = getEnteTextTheme(context);
|
||||
final colorScheme = getEnteColorScheme(context);
|
||||
const sideOfThumbnail = 60.0;
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
|
@ -53,8 +55,8 @@ class AlbumListItemWidget extends StatelessWidget {
|
|||
child: isNew
|
||||
? Text(
|
||||
"New album",
|
||||
style:
|
||||
textTheme.body.copyWith(color: colorScheme.textMuted),
|
||||
style: textTheme.body
|
||||
.copyWith(color: colorScheme.textMuted),
|
||||
)
|
||||
: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -65,8 +67,9 @@ class AlbumListItemWidget extends StatelessWidget {
|
|||
.collectionFileCount(item.collection.id),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
final text =
|
||||
snapshot.data == 1 ? " memory" : " memories";
|
||||
final text = snapshot.data == 1
|
||||
? " memory"
|
||||
: " memories";
|
||||
return Text(
|
||||
snapshot.data.toString() + text,
|
||||
style: textTheme.small.copyWith(
|
||||
|
@ -109,12 +112,15 @@ class AlbumListItemWidget extends StatelessWidget {
|
|||
//every side) so that the strokeAlign.center of this sizedBox
|
||||
//looks like a strokeAlign.inside in the row.
|
||||
height: sideOfThumbnail - 1,
|
||||
//32 is to account for padding of 16pts on both sides
|
||||
width: MediaQuery.of(context).size.width - 33,
|
||||
//This width will work for this only if the row widget takes up the
|
||||
//full size it's parent (stack).
|
||||
width: constraints.maxWidth - 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ class _CreateCollectionSheetState extends State<CreateCollectionSheet> {
|
|||
child: Scrollbar(
|
||||
radius: const Radius.circular(2),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
padding: const EdgeInsets.only(right: 12),
|
||||
child: FutureBuilder(
|
||||
future: _getCollectionsWithThumbnail(),
|
||||
builder: (context, snapshot) {
|
||||
|
|
Loading…
Reference in a new issue