mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
Porting the palette was not enough: the Warm Cinema charter only reached the widgets that read from AppColors. Nineteen screen and widget files still painted Apple TV values inline, so the app kept showing blue — most visibly on the selected navigation pill. Swept out: - 0xFF0A84FF (Apple blue) on the selected nav pill, category card icons and the "add playlist" button - 0xFF4FC3F7 and 0xFF1565C0 in the player overlays - Colors.blueAccent / Colors.blue in dialogs - Apple greys 1C1C1E / 2C2C2E / 3A3A3C / 8E8E93 -> warm charcoals - 128 Colors.white* -> the onSurfaceNN cream ladder (a pure white on a warm ground reads blue, which is the charter's whole point) - Colors.red / green / amber / yellow / grey* -> error, success, ratingGold, outlineVariant - pure black ink on light fills -> onPrimaryFixed, a warm near-black - the white focus glow -> an ember glow Deliberately left true black: the video surface backgrounds and the scrims over posters and video, where a warm tint would clash with the picture. Adds the onPrimaryFixed / primaryFixed / onSurface70 tokens the sweep needed. Verified: no Material or Apple colour literal remains outside lib/core/theme; flutter analyze reports no errors; 19/19 tests pass; release APK builds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
78 lines
2.3 KiB
Dart
78 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:xtremobile/core/theme/app_decorations.dart';
|
|
import 'package:xtremobile/mobile/widgets/tv_focusable.dart';
|
|
import 'package:xtremobile/core/theme/app_colors.dart';
|
|
|
|
class MobileCategoryCard extends StatelessWidget {
|
|
final String title;
|
|
final VoidCallback onTap;
|
|
final IconData icon;
|
|
final Color iconColor;
|
|
|
|
const MobileCategoryCard({
|
|
super.key,
|
|
required this.title,
|
|
required this.onTap,
|
|
this.icon = Icons.folder_rounded,
|
|
this.iconColor = AppColors.primary,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TVFocusable(
|
|
onPressed: onTap,
|
|
borderRadius: BorderRadius.circular(16),
|
|
child: Stack(
|
|
children: [
|
|
// Base glossy background
|
|
Container(
|
|
decoration: AppDecorations.glossyCard(context, radius: 16),
|
|
),
|
|
// Glossy highlight overlay (shimmer)
|
|
Positioned(
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
height: 60,
|
|
child: IgnorePointer(
|
|
child: Container(
|
|
decoration: AppDecorations.glossShimmer(context, radius: 16),
|
|
),
|
|
),
|
|
),
|
|
// Content
|
|
Positioned.fill(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
Icon(
|
|
icon,
|
|
color: iconColor,
|
|
size: 28,
|
|
),
|
|
const SizedBox(height: 8),
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: AppDecorations.textPrimary(context),
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 12,
|
|
letterSpacing: 0.1,
|
|
),
|
|
textAlign: TextAlign.center,
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|