Refactor label display in Line Of Sight and Map screens for improved alignment and styling (#204)

This commit is contained in:
Winston Lowe
2026-02-20 23:41:20 -08:00
committed by GitHub
parent 7acfe47fd7
commit 304c389669
2 changed files with 44 additions and 52 deletions
+21 -23
View File
@@ -802,29 +802,27 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
child: IgnorePointer( child: IgnorePointer(
child: Transform.translate( child: Transform.translate(
offset: const Offset(0, -26), offset: const Offset(0, -20),
child: Container( child: FittedBox(
padding: const EdgeInsets.symmetric( fit: BoxFit.contain,
horizontal: 6, child: Container(
vertical: 2, padding: const EdgeInsets.symmetric(
), horizontal: 6,
decoration: BoxDecoration( vertical: 2,
color: Colors.black54, ),
borderRadius: BorderRadius.circular(8), decoration: BoxDecoration(
), color: Colors.black54,
child: SizedBox( borderRadius: BorderRadius.circular(8),
width: 96, ),
child: FittedBox( alignment: Alignment.center,
fit: BoxFit.scaleDown, child: Text(
alignment: Alignment.centerLeft, endpoint.label,
child: Text( maxLines: 1,
endpoint.label, overflow: TextOverflow.ellipsis,
maxLines: 1, style: const TextStyle(
overflow: TextOverflow.ellipsis, color: Colors.white,
style: const TextStyle( fontSize: 11,
color: Colors.white, fontWeight: FontWeight.w500,
fontSize: 10,
),
), ),
), ),
), ),
+23 -29
View File
@@ -462,13 +462,10 @@ class _MapScreenState extends State<MapScreen> {
], ],
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: const Icon(
context.l10n.pathTrace_you, Icons.person_pin_circle,
style: const TextStyle( color: Colors.white,
color: Colors.black, size: 20,
fontWeight: FontWeight.bold,
fontSize: 12,
),
), ),
), ),
), ),
@@ -480,7 +477,7 @@ class _MapScreenState extends State<MapScreen> {
connector.selfLatitude!, connector.selfLatitude!,
connector.selfLongitude!, connector.selfLongitude!,
), ),
label: connector.deviceDisplayName, label: context.l10n.pathTrace_you,
), ),
], ],
), ),
@@ -598,27 +595,24 @@ class _MapScreenState extends State<MapScreen> {
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
child: IgnorePointer( child: IgnorePointer(
child: Transform.translate( child: Transform.translate(
offset: const Offset(0, -26), offset: const Offset(0, -20),
child: Container( child: FittedBox(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), fit: BoxFit.contain,
decoration: BoxDecoration( child: Container(
color: Colors.black54, padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
borderRadius: BorderRadius.circular(8), decoration: BoxDecoration(
), color: Colors.black54,
child: SizedBox( borderRadius: BorderRadius.circular(8),
width: 96, ),
child: FittedBox( alignment: Alignment.center,
fit: BoxFit.scaleDown, child: Text(
alignment: Alignment.centerLeft, label,
child: Text( maxLines: 1,
label, overflow: TextOverflow.ellipsis,
maxLines: 1, style: const TextStyle(
overflow: TextOverflow.ellipsis, color: Colors.white,
style: const TextStyle( fontSize: 11,
color: Colors.white, fontWeight: FontWeight.w500,
fontSize: 11,
fontWeight: FontWeight.w500,
),
), ),
), ),
), ),