Terminal theme: flat lists, compact settings, one-line reply quote
build / build (push) Successful in 17m24s
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:
1 parent
55386df69f
commit
e939932cef
5 files changed
+145
-29
No files matched your search
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/terminal_theme.dart';
|
||||
|
||||
/// Settings-style navigation row: leading icon, bold title, secondary
|
||||
/// subtitle and an optional trailing chevron.
|
||||
///
|
||||
@@ -40,21 +42,21 @@ class MeshNavTile extends StatelessWidget {
|
||||
final textTheme = theme.textTheme;
|
||||
final enabled = onTap != null;
|
||||
final effectiveIconColor = iconColor ?? scheme.onSurfaceVariant;
|
||||
final terminal = MeshStyle.of(context).terminal;
|
||||
final iconSize = terminal ? 18.0 : 24.0;
|
||||
|
||||
final row = Row(
|
||||
children: [
|
||||
Icon(icon, size: 24, color: effectiveIconColor),
|
||||
const SizedBox(width: 16),
|
||||
Icon(icon, size: iconSize, color: effectiveIconColor),
|
||||
SizedBox(width: terminal ? 10 : 16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: titleColor,
|
||||
),
|
||||
style: (terminal ? textTheme.bodyMedium : textTheme.bodyLarge)
|
||||
?.copyWith(fontWeight: FontWeight.w600, color: titleColor),
|
||||
),
|
||||
if (subtitle != null) ...[
|
||||
const SizedBox(height: 2),
|
||||
@@ -64,11 +66,12 @@ class MeshNavTile extends StatelessWidget {
|
||||
overflow: subtitleMaxLines == null
|
||||
? null
|
||||
: TextOverflow.ellipsis,
|
||||
style: textTheme.bodyMedium?.copyWith(
|
||||
color: titleColor != null
|
||||
? titleColor!.withValues(alpha: 0.8)
|
||||
: scheme.onSurfaceVariant,
|
||||
),
|
||||
style: (terminal ? textTheme.bodySmall : textTheme.bodyMedium)
|
||||
?.copyWith(
|
||||
color: titleColor != null
|
||||
? titleColor!.withValues(alpha: 0.8)
|
||||
: scheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
@@ -76,7 +79,11 @@ class MeshNavTile extends StatelessWidget {
|
||||
),
|
||||
?trailing,
|
||||
if (showChevron && trailing == null)
|
||||
Icon(Icons.chevron_right, color: scheme.onSurfaceVariant, size: 24),
|
||||
Icon(
|
||||
Icons.chevron_right,
|
||||
color: scheme.onSurfaceVariant,
|
||||
size: iconSize,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -87,7 +94,9 @@ class MeshNavTile extends StatelessWidget {
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: padding,
|
||||
padding: terminal
|
||||
? const EdgeInsets.symmetric(horizontal: 8, vertical: 5)
|
||||
: padding,
|
||||
// Dimmed rather than recoloured so warn/alert tints still read as
|
||||
// such while clearly unavailable.
|
||||
child: Opacity(opacity: enabled ? 1 : 0.5, child: row),
|
||||
|
||||
Reference in new issue
Block a user