Path map: theme the panels and keep overlays clear of zoom buttons
- Bottom panel, zoom buttons, toggle and panel contents use ColorScheme roles - On desktop, the observed-path selector and view toggle start past the zoom controls
This commit is contained in:
1 parent
a11f13af73
commit
2ca1ddc1b2
6 files changed
+266
-80
No files matched your search
@@ -1075,7 +1075,7 @@ class _ChannelMessagePathMapScreenState
|
||||
? l10n.channelPath_primaryPath(selectedIndex + 1)
|
||||
: l10n.channelPath_pathLabel(selectedIndex + 1);
|
||||
return Positioned(
|
||||
left: 16,
|
||||
left: pathMapTopOverlayInset(),
|
||||
right: 16,
|
||||
top: topOffset,
|
||||
child: SafeArea(
|
||||
@@ -1375,7 +1375,10 @@ class _ChannelMessagePathMapScreenState
|
||||
isImperial: isImperial,
|
||||
l10n: l10n,
|
||||
),
|
||||
style: MeshTheme.mono(fontSize: 12, color: MeshPalette.ink2),
|
||||
style: MeshTheme.mono(
|
||||
fontSize: 12,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -1430,6 +1433,7 @@ class _ChannelMessagePathMapScreenState
|
||||
Map<int, int> hopUseCount,
|
||||
) {
|
||||
final l10n = context.l10n;
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
if (hops.isEmpty) {
|
||||
return Center(child: Text(l10n.channelPath_noHopDetailsAvailable));
|
||||
}
|
||||
@@ -1459,7 +1463,7 @@ class _ChannelMessagePathMapScreenState
|
||||
color: index == highlightRow
|
||||
? highlightColor
|
||||
: isFocused
|
||||
? MeshPalette.blueBg
|
||||
? scheme.primary.withValues(alpha: 0.12)
|
||||
: Colors.transparent,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
@@ -1471,10 +1475,10 @@ class _ChannelMessagePathMapScreenState
|
||||
width: 30,
|
||||
height: 30,
|
||||
decoration: BoxDecoration(
|
||||
color: MeshPalette.blueDim.withValues(alpha: 0.3),
|
||||
color: scheme.primary.withValues(alpha: 0.18),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: MeshPalette.blueDim.withValues(alpha: 0.5),
|
||||
color: scheme.primary.withValues(alpha: 0.5),
|
||||
),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
@@ -1482,8 +1486,8 @@ class _ChannelMessagePathMapScreenState
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
hop.index.toString(),
|
||||
style: const TextStyle(
|
||||
color: MeshPalette.ink,
|
||||
style: TextStyle(
|
||||
color: scheme.onSurface,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
@@ -1516,7 +1520,7 @@ class _ChannelMessagePathMapScreenState
|
||||
].join(' · '),
|
||||
style: MeshTheme.mono(
|
||||
fontSize: 12,
|
||||
color: MeshPalette.ink3,
|
||||
color: scheme.onSurfaceVariant,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
@@ -1235,7 +1235,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (_isLoading)
|
||||
CircularProgressIndicator(color: MeshPalette.blue),
|
||||
CircularProgressIndicator(color: scheme.primary),
|
||||
const SizedBox(height: 16),
|
||||
if (!_isLoading && _failed2Loaded)
|
||||
Text(
|
||||
@@ -1803,7 +1803,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
style: MeshTheme.mono(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 13,
|
||||
color: MeshPalette.ink,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
combined: combined,
|
||||
@@ -1880,6 +1880,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
itemCount: pathTraceData.pathData.length + 1,
|
||||
separatorBuilder: (_, _) => const Divider(height: 1),
|
||||
itemBuilder: (context, index) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final snrUi = snrUiFromSNR(
|
||||
index < pathTraceData.snrData.length
|
||||
? pathTraceData.snrData[index]
|
||||
@@ -1894,15 +1895,18 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
index >= pathTraceData.snrData.length / 2
|
||||
? Icons.call_received
|
||||
: Icons.call_made,
|
||||
color: MeshPalette.ink2,
|
||||
color: scheme.onSurfaceVariant,
|
||||
),
|
||||
title: Text(
|
||||
formatDirectionText(pathTraceData, index),
|
||||
style: MeshTheme.mono(fontSize: 13, color: MeshPalette.ink),
|
||||
style: MeshTheme.mono(fontSize: 13, color: scheme.onSurface),
|
||||
),
|
||||
subtitle: Text(
|
||||
formatDirectionSubText(pathTraceData, index),
|
||||
style: MeshTheme.mono(fontSize: 12, color: MeshPalette.ink3),
|
||||
style: MeshTheme.mono(
|
||||
fontSize: 12,
|
||||
color: scheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
trailing: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -1943,6 +1947,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
itemCount: path.totalTransmissions,
|
||||
separatorBuilder: (_, _) => const Divider(height: 1),
|
||||
itemBuilder: (context, index) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
String title;
|
||||
String subtitle;
|
||||
Widget? trailing;
|
||||
@@ -2017,11 +2022,14 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen>
|
||||
),
|
||||
title: Text(
|
||||
title,
|
||||
style: MeshTheme.mono(fontSize: 13, color: MeshPalette.ink),
|
||||
style: MeshTheme.mono(fontSize: 13, color: scheme.onSurface),
|
||||
),
|
||||
subtitle: Text(
|
||||
subtitle,
|
||||
style: MeshTheme.mono(fontSize: 12, color: MeshPalette.ink3),
|
||||
style: MeshTheme.mono(
|
||||
fontSize: 12,
|
||||
color: scheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
trailing: trailing,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user