Merge upstream/dev (35 commits) into tth
Conflicts in lib/widgets/mesh_nav_tile.dart and lib/widgets/mesh_ui.dart: took upstream's iconSlot/ThemedIcon, busy spinner and SectionHeader description, and re-applied the terminal theme on top (18 dp icons, narrower gaps and padding, mono section labels). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
ceab62428a
103 files changed
+13328
-5463
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/terminal_theme.dart';
|
||||
import '../theme/theme_icons.dart';
|
||||
|
||||
/// Title style of settings rows: [MeshNavTile] and, through
|
||||
/// [MeshSettingsTileTheme], stock [ListTile]s and [SwitchListTile]s.
|
||||
@@ -34,12 +35,20 @@ class MeshSettingsTileTheme extends StatelessWidget {
|
||||
/// looks identical to one that can.
|
||||
class MeshNavTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
|
||||
/// Theme icon to show instead of [icon], so the row follows the user's
|
||||
/// theme like the contact list does.
|
||||
final ThemeIconSlot? iconSlot;
|
||||
final String title;
|
||||
final String? subtitle;
|
||||
final VoidCallback? onTap;
|
||||
final Color? titleColor;
|
||||
final Color? iconColor;
|
||||
final bool showChevron;
|
||||
|
||||
/// Shows the 18px spinner in place of the chevron and ignores taps while
|
||||
/// the row's action runs (e.g. a radio command). The row isn't dimmed.
|
||||
final bool busy;
|
||||
final Widget? trailing;
|
||||
final int? subtitleMaxLines;
|
||||
final EdgeInsetsGeometry padding;
|
||||
@@ -47,12 +56,14 @@ class MeshNavTile extends StatelessWidget {
|
||||
const MeshNavTile({
|
||||
super.key,
|
||||
required this.icon,
|
||||
this.iconSlot,
|
||||
required this.title,
|
||||
this.subtitle,
|
||||
this.onTap,
|
||||
this.titleColor,
|
||||
this.iconColor,
|
||||
this.showChevron = true,
|
||||
this.busy = false,
|
||||
this.trailing,
|
||||
this.subtitleMaxLines,
|
||||
this.padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
@@ -70,7 +81,9 @@ class MeshNavTile extends StatelessWidget {
|
||||
|
||||
final row = Row(
|
||||
children: [
|
||||
Icon(icon, size: iconSize, color: effectiveIconColor),
|
||||
iconSlot == null
|
||||
? Icon(icon, size: iconSize, color: effectiveIconColor)
|
||||
: ThemedIcon(iconSlot!, size: iconSize, color: effectiveIconColor),
|
||||
SizedBox(width: terminal ? 10 : 16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -106,7 +119,17 @@ class MeshNavTile extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
?trailing,
|
||||
if (showChevron && trailing == null)
|
||||
if (busy && trailing == null)
|
||||
SizedBox.square(
|
||||
dimension: iconSize,
|
||||
child: const Center(
|
||||
child: SizedBox.square(
|
||||
dimension: 18,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
),
|
||||
)
|
||||
else if (showChevron && trailing == null)
|
||||
Icon(
|
||||
Icons.chevron_right,
|
||||
color: scheme.onSurfaceVariant,
|
||||
@@ -118,9 +141,9 @@ class MeshNavTile extends StatelessWidget {
|
||||
return MergeSemantics(
|
||||
child: Semantics(
|
||||
button: true,
|
||||
enabled: enabled,
|
||||
enabled: enabled && !busy,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
onTap: busy ? null : onTap,
|
||||
child: Padding(
|
||||
padding: terminal
|
||||
? const EdgeInsets.symmetric(horizontal: 8, vertical: 5)
|
||||
|
||||
Reference in new issue
Block a user