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
+6 -8
View File
@@ -802,7 +802,9 @@ 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: FittedBox(
fit: BoxFit.contain,
child: Container( child: Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 6, horizontal: 6,
@@ -812,19 +814,15 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
color: Colors.black54, color: Colors.black54,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
child: SizedBox( alignment: Alignment.center,
width: 96,
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text( child: Text(
endpoint.label, endpoint.label,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: const TextStyle( style: const TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 10, fontSize: 11,
), fontWeight: FontWeight.w500,
), ),
), ),
), ),
+9 -15
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,18 +595,16 @@ 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: FittedBox(
fit: BoxFit.contain,
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black54, color: Colors.black54,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
child: SizedBox( alignment: Alignment.center,
width: 96,
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text( child: Text(
label, label,
maxLines: 1, maxLines: 1,
@@ -624,7 +619,6 @@ class _MapScreenState extends State<MapScreen> {
), ),
), ),
), ),
),
); );
} }