From 5bb63cc6ef028ab46bdceb77dea01bae79050ba1 Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Mon, 22 Jul 2019 20:00:49 +0900 Subject: [PATCH] style --- lib/image_fullscreen_page.dart | 93 ++++++++++++++++++++++------------ lib/main.dart | 1 + lib/thumbnail_collection.dart | 9 +++- 3 files changed, 70 insertions(+), 33 deletions(-) diff --git a/lib/image_fullscreen_page.dart b/lib/image_fullscreen_page.dart index cff7efc5e..05672cf56 100644 --- a/lib/image_fullscreen_page.dart +++ b/lib/image_fullscreen_page.dart @@ -121,38 +121,67 @@ class FullscreenOverlay extends StatelessWidget { child: Container( padding: EdgeInsets.all(8.0).add(EdgeInsets.only(bottom: viewInsets.bottom)), color: Colors.black45, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('${index + 1} / $total - ${entry['title']}'), - Row( - children: [ - Expanded(child: Text('${DateFormat.yMMMd().format(date)} – ${DateFormat.Hm().format(date)}')), - Expanded(child: Text('${entry['width']} × ${entry['height']}')), - ], - ), - FutureBuilder( - future: ImageFetcher.getOverlayMetadata(entry['path']), - builder: (futureContext, AsyncSnapshot snapshot) { - if (snapshot.connectionState != ConnectionState.done || snapshot.hasError) { - return Text(''); - } - var metadata = snapshot.data; - if (metadata.isEmpty) { - return Text(''); - } - return Row( - children: [ - Expanded(child: Text(metadata['aperture'])), - Expanded(child: Text(metadata['exposureTime'])), - Expanded(child: Text(metadata['focalLength'])), - Expanded(child: Text(metadata['iso'])), - ], - ); - }, - ) - ], + child: DefaultTextStyle( + style: TextStyle( + shadows: [ + Shadow( + color: Colors.black87, + offset: Offset(0.0, 1.0), + ) + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '${index + 1} / $total – ${entry['title']}', + overflow: TextOverflow.ellipsis, + ), + SizedBox(height: 4), + Row( + children: [ + Padding( + padding: EdgeInsets.only(right: 8.0), + child: Icon( + Icons.calendar_today, + size: 16, + ), + ), + Expanded(child: Text('${DateFormat.yMMMd().format(date)} – ${DateFormat.Hm().format(date)}')), + Expanded(child: Text('${entry['width']} × ${entry['height']}')), + ], + ), + SizedBox(height: 4), + FutureBuilder( + future: ImageFetcher.getOverlayMetadata(entry['path']), + builder: (futureContext, AsyncSnapshot snapshot) { + if (snapshot.connectionState != ConnectionState.done || snapshot.hasError) { + return Text(''); + } + var metadata = snapshot.data; + if (metadata.isEmpty) { + return Text(''); + } + return Row( + children: [ + Padding( + padding: EdgeInsets.only(right: 8.0), + child: Icon( + Icons.camera, + size: 16, + ), + ), + Expanded(child: Text((metadata['aperture'] as String).replaceAll('f', 'ƒ'))), + Expanded(child: Text(metadata['exposureTime'])), + Expanded(child: Text(metadata['focalLength'])), + Expanded(child: Text(metadata['iso'])), + ], + ); + }, + ) + ], + ), ), ), ); diff --git a/lib/main.dart b/lib/main.dart index 802377011..8d3972c4c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,6 +16,7 @@ class MyApp extends StatelessWidget { theme: ThemeData( brightness: Brightness.dark, accentColor: Colors.amberAccent, + scaffoldBackgroundColor: Colors.grey[900] ), home: HomePage(), ); diff --git a/lib/thumbnail_collection.dart b/lib/thumbnail_collection.dart index 8a7a2d714..904920e87 100644 --- a/lib/thumbnail_collection.dart +++ b/lib/thumbnail_collection.dart @@ -103,8 +103,15 @@ class SectionHeader extends StatelessWidget { child: OutlinedText( primaryText, style: TextStyle( - color: Colors.white, + color: Colors.grey[200], fontSize: 20, + shadows: [ + Shadow( + offset: Offset(0, 2), + blurRadius: 3, + color: Colors.grey[900] + ), + ], ), outlineColor: Colors.black87, outlineWidth: 2,