Terminal theme: flat lists, compact settings, one-line reply quote
build / build (push) Successful in 17m24s

In the terminal theme only:
- MeshCard becomes a flat row with a rule underneath: no margin, no
  corners, 8/4 padding. Channel and contact lists, settings groups and
  every other card shrink to about half their height.
- AvatarCircle is just the glyph (icon or initials, at most 20 px), the
  contact emoji avatar likewise.
- MeshNavTile and SectionHeader: smaller icons, padding and type.
- Text line height 1.2 instead of Material's 1.4-1.5.
- A reply in a channel is one dim line above the message,
  "↳ <nick> quoted text…", instead of the boxed preview; the
  "replying to" banner above the composer loses its padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-10-22 12:28:24 +02:00
1 parent 55386df69f
commit e939932cef
5 files changed
+145 -29

No files matched your search

+49 -10
View File
@@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
import '../l10n/l10n.dart';
import '../theme/mesh_theme.dart';
import '../theme/terminal_theme.dart';
/// MeshCore shared design kit.
///
@@ -30,16 +31,24 @@ class SectionHeader extends StatelessWidget {
Widget build(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
return Padding(
padding: padding,
padding: MeshStyle.of(context).terminal
? const EdgeInsets.fromLTRB(8, 10, 8, 2)
: padding,
child: Row(
children: [
Expanded(
child: Text(
label.toUpperCase(),
style: MeshTheme.accentLabel(
color: scheme.onSurfaceVariant,
fontSize: 13,
),
style: MeshStyle.of(context).terminal
? MeshTheme.mono(
color: scheme.onSurfaceVariant,
fontSize: 12,
fontWeight: FontWeight.w700,
)
: MeshTheme.accentLabel(
color: scheme.onSurfaceVariant,
fontSize: 13,
),
overflow: TextOverflow.ellipsis,
),
),
@@ -79,12 +88,21 @@ class MeshCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
final shape = RoundedRectangleBorder(
borderRadius: BorderRadius.circular(radius),
side: BorderSide(color: borderColor ?? scheme.outlineVariant),
);
// Terminal theme: a flat list row with a rule underneath, no gaps.
final terminal = MeshStyle.of(context).terminal;
final ShapeBorder shape = terminal
? Border(
bottom: BorderSide(color: borderColor ?? scheme.outlineVariant),
)
: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(radius),
side: BorderSide(color: borderColor ?? scheme.outlineVariant),
);
final padding = terminal && this.padding != EdgeInsets.zero
? const EdgeInsets.symmetric(horizontal: 8, vertical: 4)
: this.padding;
return Padding(
padding: margin,
padding: terminal ? EdgeInsets.zero : margin,
child: Material(
color: color ?? scheme.surfaceContainerLow,
shape: shape,
@@ -274,6 +292,27 @@ class AvatarCircle extends StatelessWidget {
Widget build(BuildContext context) {
final accent = color ?? _colorFor(name);
final initials = _initials(name);
if (MeshStyle.of(context).terminal) {
// Terminal theme: just the glyph, small enough for a one-line row.
final s = math.min(size, 20.0);
return SizedBox(
width: s,
height: s,
child: Center(
child: icon != null
? Icon(icon, size: s * 0.85, color: accent)
: Text(
initials,
style: MeshTheme.mono(
fontSize: s * 0.55,
fontWeight: FontWeight.w700,
color: accent,
letterSpacing: 0,
),
),
),
);
}
return Container(
width: size,
height: size,