diff --git a/lib/widgets/album/filter_bar.dart b/lib/widgets/album/filter_bar.dart index 6ff76173c..271f1689c 100644 --- a/lib/widgets/album/filter_bar.dart +++ b/lib/widgets/album/filter_bar.dart @@ -46,31 +46,34 @@ class FilterBar extends StatelessWidget implements PreferredSizeWidget { final label = filter.label; return ConstrainedBox( constraints: const BoxConstraints(maxWidth: maxChipWidth), - child: OutlineButton( - onPressed: () {}, - borderSide: BorderSide( - color: stringToColor(label), - width: NavigationButton.buttonBorderWidth, - ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(42), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (icon != null) ...[ - Icon(icon), - const SizedBox(width: 8), - ], - Flexible( - child: Text( - label, - softWrap: false, - overflow: TextOverflow.fade, - maxLines: 1, + child: Tooltip( + message: label, + child: OutlineButton( + onPressed: () {}, + borderSide: BorderSide( + color: stringToColor(label), + width: NavigationButton.buttonBorderWidth, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(42), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + if (icon != null) ...[ + Icon(icon), + const SizedBox(width: 8), + ], + Flexible( + child: Text( + label, + softWrap: false, + overflow: TextOverflow.fade, + maxLines: 1, + ), ), - ), - ], + ], + ), ), ), ); diff --git a/lib/widgets/debug_page.dart b/lib/widgets/debug_page.dart index f4b1e3d1e..c284a1973 100644 --- a/lib/widgets/debug_page.dart +++ b/lib/widgets/debug_page.dart @@ -38,63 +38,65 @@ class DebugPageState extends State { return MediaQueryDataProvider( child: Scaffold( appBar: AppBar( - title: const Text('Info'), + title: const Text('Debug'), ), - body: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text('Settings'), - Text('collectionGroupFactor: ${settings.collectionGroupFactor}'), - Text('collectionSortFactor: ${settings.collectionSortFactor}'), - Text('infoMapZoom: ${settings.infoMapZoom}'), - const Divider(), - Text('Entries: ${entries.length}'), - Text('Catalogued: ${catalogued.length}'), - Text('With GPS: ${withGps.length}'), - Text('With address: ${located.length}'), - const Divider(), - RaisedButton( - onPressed: () async { - await metadataDb.reset(); - _startDbReport(); - }, - child: const Text('Reset DB'), - ), - FutureBuilder( - future: _dbFileSizeLoader, - builder: (context, AsyncSnapshot snapshot) { - if (snapshot.hasError) return Text(snapshot.error.toString()); - if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); - return Text('DB file size: ${formatFilesize(snapshot.data)}'); - }, - ), - FutureBuilder( - future: _dbMetadataLoader, - builder: (context, AsyncSnapshot> snapshot) { - if (snapshot.hasError) return Text(snapshot.error.toString()); - if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); - return Text('DB metadata rows: ${snapshot.data.length}'); - }, - ), - FutureBuilder( - future: _dbAddressLoader, - builder: (context, AsyncSnapshot> snapshot) { - if (snapshot.hasError) return Text(snapshot.error.toString()); - if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); - return Text('DB address rows: ${snapshot.data.length}'); - }, - ), - const Divider(), - const Text('Time dilation'), - Slider( - value: timeDilation, - onChanged: (v) => setState(() => timeDilation = v), - min: 1.0, - max: 10.0, - divisions: 9, - label: '$timeDilation', - ), - ], + body: SafeArea( + child: ListView( + padding: const EdgeInsets.all(8), + children: [ + const Text('Settings'), + Text('collectionGroupFactor: ${settings.collectionGroupFactor}'), + Text('collectionSortFactor: ${settings.collectionSortFactor}'), + Text('infoMapZoom: ${settings.infoMapZoom}'), + const Divider(), + Text('Entries: ${entries.length}'), + Text('Catalogued: ${catalogued.length}'), + Text('With GPS: ${withGps.length}'), + Text('With address: ${located.length}'), + const Divider(), + RaisedButton( + onPressed: () async { + await metadataDb.reset(); + _startDbReport(); + }, + child: const Text('Reset DB'), + ), + FutureBuilder( + future: _dbFileSizeLoader, + builder: (context, AsyncSnapshot snapshot) { + if (snapshot.hasError) return Text(snapshot.error.toString()); + if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); + return Text('DB file size: ${formatFilesize(snapshot.data)}'); + }, + ), + FutureBuilder( + future: _dbMetadataLoader, + builder: (context, AsyncSnapshot> snapshot) { + if (snapshot.hasError) return Text(snapshot.error.toString()); + if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); + return Text('DB metadata rows: ${snapshot.data.length}'); + }, + ), + FutureBuilder( + future: _dbAddressLoader, + builder: (context, AsyncSnapshot> snapshot) { + if (snapshot.hasError) return Text(snapshot.error.toString()); + if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink(); + return Text('DB address rows: ${snapshot.data.length}'); + }, + ), + const Divider(), + const Text('Time dilation'), + Slider( + value: timeDilation, + onChanged: (v) => setState(() => timeDilation = v), + min: 1.0, + max: 10.0, + divisions: 9, + label: '$timeDilation', + ), + ], + ), ), ), ); diff --git a/lib/widgets/fullscreen/overlay/top.dart b/lib/widgets/fullscreen/overlay/top.dart index be7110c4a..0dc388aab 100644 --- a/lib/widgets/fullscreen/overlay/top.dart +++ b/lib/widgets/fullscreen/overlay/top.dart @@ -40,7 +40,7 @@ class FullscreenTopOverlay extends StatelessWidget { OverlayButton( scale: scale, child: IconButton( - icon: Icon(OMIcons.share), + icon: const Icon(OMIcons.share), onPressed: () => onActionSelected?.call(FullscreenAction.share), tooltip: 'Share', ), @@ -50,7 +50,7 @@ class FullscreenTopOverlay extends StatelessWidget { OverlayButton( scale: scale, child: IconButton( - icon: Icon(OMIcons.delete), + icon: const Icon(OMIcons.delete), onPressed: () => onActionSelected?.call(FullscreenAction.delete), tooltip: 'Delete', ),