mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-10 02:32:47 +10:00
Refactor label display in Line Of Sight and Map screens for improved alignment and styling (#204)
This commit is contained in:
@@ -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
@@ -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,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user