Fix layouts on small screens and large text, and test every screen
Contact rows give the name its own line (wrapping to two) with route and last seen below, right-aligned on wide windows. Fixes overflows found by a new widget test that renders every screen at 320x568 with text scales up to 2.0 and on a desktop window: region dropdown, contacts list, repeater CLI, status grid and settings card, map cache buttons, and empty states. Dropdowns truncate long labels, and option sheets and dialogs scroll.
This commit is contained in:
1 parent
f0144ca959
commit
979e1a7d2a
21 files changed
+1512
-979
No files matched your search
@@ -26,46 +26,51 @@ class ReviewModeBanner extends StatelessWidget {
|
||||
minimumSize: const Size(48, 48),
|
||||
);
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: const BoxDecoration(
|
||||
color: MeshPalette.bg3,
|
||||
border: Border(bottom: BorderSide(color: MeshPalette.warnLine)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.science, color: MeshPalette.warn, size: 24),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(child: Text(l10n.reviewMode_banner, style: textStyle)),
|
||||
],
|
||||
),
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
children: [
|
||||
TextButton(
|
||||
style: buttonStyle,
|
||||
onPressed: () {
|
||||
connector.sendReviewTestMessage();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(l10n.reviewMode_testSent)),
|
||||
);
|
||||
},
|
||||
child: Text(l10n.reviewMode_sendTest),
|
||||
),
|
||||
TextButton(
|
||||
style: buttonStyle,
|
||||
// The screens hosting the banner return to the Connect screen
|
||||
// themselves once disconnected.
|
||||
onPressed: () => connector.disconnect(manual: true),
|
||||
child: Text(l10n.reviewMode_exit),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
// A status strip on every main screen: capped so that at the largest
|
||||
// text sizes it can't take over a small phone's screen.
|
||||
return MediaQuery.withClampedTextScaling(
|
||||
maxScaleFactor: 1.3,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: const BoxDecoration(
|
||||
color: MeshPalette.bg3,
|
||||
border: Border(bottom: BorderSide(color: MeshPalette.warnLine)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.science, color: MeshPalette.warn, size: 24),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(child: Text(l10n.reviewMode_banner, style: textStyle)),
|
||||
],
|
||||
),
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
children: [
|
||||
TextButton(
|
||||
style: buttonStyle,
|
||||
onPressed: () {
|
||||
connector.sendReviewTestMessage();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(l10n.reviewMode_testSent)),
|
||||
);
|
||||
},
|
||||
child: Text(l10n.reviewMode_sendTest),
|
||||
),
|
||||
TextButton(
|
||||
style: buttonStyle,
|
||||
// The screens hosting the banner return to the Connect screen
|
||||
// themselves once disconnected.
|
||||
onPressed: () => connector.disconnect(manual: true),
|
||||
child: Text(l10n.reviewMode_exit),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user