[mob][photos] changes: adjust thumbnail size and gap for 3x3 layout
This commit is contained in:
@@ -66,8 +66,8 @@ class _DeviceFolderVerticalGridViewBodyState
|
||||
Width changes dynamically with screen width such that we can fit 2 in one row.
|
||||
Keep the width integral (center the albums to distribute excess pixels)
|
||||
*/
|
||||
static const maxThumbnailWidth = 224.0;
|
||||
static const fixedGapBetweenAlbum = 8.0;
|
||||
static const maxThumbnailWidth = 170.0;
|
||||
static const fixedGapBetweenAlbum = 2.0;
|
||||
static const minGapForHorizontalPadding = 8.0;
|
||||
|
||||
@override
|
||||
@@ -103,7 +103,7 @@ class _DeviceFolderVerticalGridViewBodyState
|
||||
if (snapshot.hasData) {
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
final int albumsCountInOneRow =
|
||||
max(screenWidth ~/ maxThumbnailWidth, 2);
|
||||
max(screenWidth ~/ maxThumbnailWidth, 3);
|
||||
final double gapBetweenAlbums =
|
||||
(albumsCountInOneRow - 1) * fixedGapBetweenAlbum;
|
||||
final double gapOnSizeOfAlbums = minGapForHorizontalPadding +
|
||||
|
||||
Reference in New Issue
Block a user