minor fixes
This commit is contained in:
parent
8a014888a6
commit
246e697d9d
3 changed files with 87 additions and 82 deletions
|
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -38,63 +38,65 @@ class DebugPageState extends State<DebugPage> {
|
|||
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<int> 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<List<CatalogMetadata>> 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<List<AddressDetails>> 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<int> 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<List<CatalogMetadata>> 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<List<AddressDetails>> 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',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -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',
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue