Merge upstream/dev: custom and holiday themes, chat backgrounds
build / ci-image (push) Successful in 9s
build / build (push) Successful in 11m47s

Upstream's theme system (two-color custom themes, holiday themes, picture
icons, chat backgrounds) next to the tth terminal theme:
- a user's custom theme wins; without one, themeMode 'terminal' is still
  the dark theme (main.dart);
- MeshTheme.buildFrom (terminal base) builds with the stock bubble, icon
  and map extensions, like dark()/light();
- terminal avatars also show a theme slot's glyph; the bottom bar stays
  44 px without labels in the terminal theme, 76/60 otherwise;
- map overlays: terminal panels stay square and black, otherwise
  upstream's palette/follow-theme logic; channel list keeps the terminal
  padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-02 16:12:14 +01:00
commit 675342e745
144 files changed
+13281 -732

No files matched your search

+43 -21
View File
@@ -24,6 +24,7 @@ import '../widgets/translation_settings_section.dart';
import '../tth_fork.dart';
import '../helpers/snack_bar_builder.dart';
import 'map_cache_screen.dart';
import 'themes_screen.dart';
class AppSettingsScreen extends StatelessWidget {
/// Scrolls the image-message settings into view once, on first build.
@@ -197,8 +198,15 @@ class AppSettingsScreen extends StatelessWidget {
// tth fork: untranslated on purpose, it is a name.
const ButtonSegment(value: 'terminal', label: Text('Term')),
],
selected: {settingsService.settings.themeMode},
// A custom theme sets its own brightness, so no stock mode
// is selected while one is active; picking a mode returns
// to the stock theme.
emptySelectionAllowed: true,
selected: settingsService.activeCustomTheme == null
? {settingsService.settings.themeMode}
: const <String>{},
onSelectionChanged: (selection) {
if (selection.isEmpty) return;
settingsService.setThemeMode(selection.first);
},
),
@@ -206,6 +214,36 @@ class AppSettingsScreen extends StatelessWidget {
),
),
const Divider(height: 1, indent: 16),
MeshNavTile(
icon: Icons.palette_outlined,
title: context.l10n.appSettings_colorTheme,
subtitle:
settingsService.activeCustomTheme?.name ??
context.l10n.themes_default,
trailing: settingsService.activeCustomTheme == null
? null
: ThemeSwatch(
background: settingsService.activeCustomTheme!.background,
accent: settingsService.activeCustomTheme!.accent,
size: 32,
),
onTap: () => Navigator.of(
context,
).push(MaterialPageRoute(builder: (_) => const ThemesScreen())),
),
const Divider(height: 1, indent: 16),
SwitchListTile(
contentPadding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 4,
),
secondary: const Icon(Icons.celebration_outlined, size: 24),
title: Text(context.l10n.appSettings_holidayAnimations),
subtitle: Text(context.l10n.appSettings_holidayAnimationsSubtitle),
value: settingsService.settings.holidayAnimationsEnabled,
onChanged: settingsService.setHolidayAnimationsEnabled,
),
const Divider(height: 1, indent: 16),
MeshNavTile(
icon: Icons.language_outlined,
title: context.l10n.appSettings_language,
@@ -1651,17 +1689,10 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
value: 'deactivated',
child: Text(l10n.appSettings_ipfsGatewayDeactivated),
),
DropdownMenuItem(
value: 'ipfsio',
child: Text(l10n.appSettings_ipfsGatewayIpfsIo),
),
DropdownMenuItem(
value: 'pinata',
child: Text(l10n.appSettings_ipfsGatewayPinata),
),
DropdownMenuItem(value: 'pinata', child: const Text('Pinata')),
DropdownMenuItem(
value: 'filebase',
child: Text(l10n.appSettings_ipfsGatewayFilebase),
child: const Text('Filebase'),
),
DropdownMenuItem(
value: 'custom',
@@ -1692,13 +1723,10 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
labelText: l10n.appSettings_uploadIpfsProvider,
),
items: [
DropdownMenuItem(
value: 'pinata',
child: Text(l10n.appSettings_ipfsGatewayPinata),
),
DropdownMenuItem(value: 'pinata', child: const Text('Pinata')),
DropdownMenuItem(
value: 'filebase',
child: Text(l10n.appSettings_ipfsGatewayFilebase),
child: const Text('Filebase'),
),
DropdownMenuItem(
value: 'custom',
@@ -1821,10 +1849,6 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
String _gatewayPreset(String value) {
if (value.isEmpty) return 'deactivated';
if (value == AppSettings.defaultPublicIpfsGateway ||
value == 'https://ipfs.io/ipfs') {
return 'ipfsio';
}
if (value == 'https://gateway.pinata.cloud/ipfs/' ||
value == 'https://gateway.pinata.cloud/ipfs') {
return 'pinata';
@@ -1840,8 +1864,6 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
switch (preset) {
case 'deactivated':
return '';
case 'ipfsio':
return AppSettings.defaultPublicIpfsGateway;
case 'pinata':
return 'https://gateway.pinata.cloud/ipfs/';
case 'filebase':