Terminal theme: square bottom bar and map overlays

The contacts/channels/map switch bar loses its rounded corners, labels
and 16 px of height; the map's search field, zoom column, legend, stats
and source switch become square black panels. Node markers stay round.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-10-22 22:46:37 +02:00
1 parent e939932cef
commit b47afe7854
2 files changed
+36 -14

No files matched your search

+25 -12
View File
@@ -40,6 +40,7 @@ import 'channels_screen.dart';
import 'chat_screen.dart';
import 'contacts_screen.dart';
import '../theme/mesh_theme.dart';
import '../theme/terminal_theme.dart';
import '../widgets/mesh_ui.dart';
import '../widgets/repeater_login_dialog.dart';
import '../widgets/room_login_dialog.dart';
@@ -169,7 +170,19 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
bool get _useDarkOverlay => Theme.of(context).brightness == Brightness.dark;
Color get _overlayPanelColor => _useDarkOverlay
// tth fork: square, black overlays in the terminal theme.
bool get _terminal => MeshStyle.of(context).terminal;
BorderRadius _overlayRadius(double radius) =>
_terminal ? BorderRadius.zero : BorderRadius.circular(radius);
OutlinedBorder _overlayPill({BorderSide side = BorderSide.none}) => _terminal
? RoundedRectangleBorder(side: side)
: StadiumBorder(side: side);
Color get _overlayPanelColor => _terminal
? const Color(0xEB000000)
: _useDarkOverlay
? MapPalette.panelDark
: _overlayScheme.surfaceContainerLow.withValues(alpha: 0.96);
@@ -404,7 +417,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
child: DecoratedBox(
decoration: BoxDecoration(
color: _overlayPanelColor,
borderRadius: BorderRadius.circular(MeshRadii.md),
borderRadius: _overlayRadius(MeshRadii.md),
border: Border.all(color: _overlayBorderColor),
boxShadow: [
BoxShadow(
@@ -415,7 +428,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(MeshRadii.md),
borderRadius: _overlayRadius(MeshRadii.md),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
@@ -1691,7 +1704,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 1),
decoration: BoxDecoration(
color: _overlayPanelColor,
borderRadius: BorderRadius.circular(MeshRadii.xs),
borderRadius: _overlayRadius(MeshRadii.xs),
border: Border.all(color: _overlayBorderColor),
boxShadow: [
BoxShadow(
@@ -1924,7 +1937,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
Expanded(
child: Material(
color: _overlayPanelColor,
shape: StadiumBorder(
shape: _overlayPill(
side: BorderSide(color: _overlayBorderColor),
),
clipBehavior: Clip.antiAlias,
@@ -1977,7 +1990,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
const SizedBox(width: 8),
Material(
color: _overlayPanelColor,
shape: StadiumBorder(
shape: _overlayPill(
side: BorderSide(color: _overlayBorderColor),
),
clipBehavior: Clip.antiAlias,
@@ -2110,7 +2123,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
final l10n = context.l10n;
return Material(
color: _overlayPanelColor,
shape: StadiumBorder(side: BorderSide(color: _overlayBorderColor)),
shape: _overlayPill(side: BorderSide(color: _overlayBorderColor)),
clipBehavior: Clip.antiAlias,
child: SegmentedButton<MapSourceOption>(
showSelectedIcon: false,
@@ -2195,7 +2208,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
_overlayPanelColor,
)
: _overlayPanelColor,
shape: StadiumBorder(
shape: _overlayPill(
side: BorderSide(
color: selected ? accent : _overlayBorderColor,
width: selected ? 1.5 : 1,
@@ -2260,7 +2273,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
constraints: const BoxConstraints(maxHeight: 300),
decoration: BoxDecoration(
color: _overlayPanelColor,
borderRadius: BorderRadius.circular(MeshRadii.md),
borderRadius: _overlayRadius(MeshRadii.md),
border: Border.all(color: _overlayBorderColor),
boxShadow: [
BoxShadow(
@@ -2395,7 +2408,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
padding: const EdgeInsets.fromLTRB(14, 12, 14, 12),
decoration: BoxDecoration(
color: _overlayPanelColor,
borderRadius: BorderRadius.circular(MeshRadii.md),
borderRadius: _overlayRadius(MeshRadii.md),
border: Border.all(color: _overlayBorderColor),
boxShadow: [
BoxShadow(
@@ -4180,7 +4193,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
child: DecoratedBox(
decoration: BoxDecoration(
color: _overlayPanelColor,
borderRadius: BorderRadius.circular(MeshRadii.md),
borderRadius: _overlayRadius(MeshRadii.md),
border: Border.all(color: _overlayBorderColor),
boxShadow: [
BoxShadow(
@@ -4191,7 +4204,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(MeshRadii.md),
borderRadius: _overlayRadius(MeshRadii.md),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
+11 -2
View File
@@ -3,6 +3,7 @@ import 'dart:ui';
import 'package:flutter/material.dart';
import '../l10n/l10n.dart';
import '../theme/mesh_theme.dart';
import '../theme/terminal_theme.dart';
class QuickSwitchBar extends StatelessWidget {
final int selectedIndex;
@@ -40,11 +41,13 @@ class QuickSwitchBar extends StatelessWidget {
? MapPalette.textSecondary
: colorScheme.onSurfaceVariant;
final indicator = highContrast ? MapPalette.selected : colorScheme.primary;
// tth fork, terminal theme: a square strip of icons, no labels.
final terminal = MeshStyle.of(context).terminal;
return SizedBox(
width: double.infinity,
child: ClipRRect(
borderRadius: BorderRadius.circular(20),
borderRadius: terminal ? BorderRadius.zero : BorderRadius.circular(20),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 14, sigmaY: 14),
child: DecoratedBox(
@@ -62,6 +65,9 @@ class QuickSwitchBar extends StatelessWidget {
surfaceTintColor: Colors.transparent,
shadowColor: Colors.transparent,
indicatorColor: indicator,
indicatorShape: terminal
? const RoundedRectangleBorder()
: null,
labelTextStyle: WidgetStateProperty.resolveWith((states) {
final isSelected = states.contains(WidgetState.selected);
return labelStyle.copyWith(
@@ -77,7 +83,10 @@ class QuickSwitchBar extends StatelessWidget {
}),
),
child: NavigationBar(
height: 60,
height: terminal ? 44 : 60,
labelBehavior: terminal
? NavigationDestinationLabelBehavior.alwaysHide
: null,
selectedIndex: selectedIndex,
onDestinationSelected: onDestinationSelected,
destinations: [