Replaces the Material 3 screens with the Noo design system: warm neutrals, one violet accent, pill controls, Schibsted Grotesk/ Instrument Sans, Lucide icons, no gradients/shadows. - New lib/widgets/noo/ component kit (core, lists, files, media, nav, overlays) plus lib/theme/design_tokens.dart for the color/type/space/ radius/motion tokens. - Rebuilt the app shell (top/bottom bars, drawer, desktop sidebar and toolbar), every tab (Files/Offline, Photos, Favorites, Recent, Activity, Trash, Shares), Settings, the lock and login screens, the media viewer, search, the details/share sheets, and the share-upload and move/copy destination pickers. - Added a design canvas (linked from DESIGN_SYSTEM.md) covering the screens the spec didn't already describe, with matching Android and iOS chrome; wrote up the approved recipes into DESIGN_SYSTEM.md §4. - Removed now-dead legacy widgets (media_grid_tile, swipeable_item, sync_status_badge, selectable_thumbnail) and updated architecture.md/styling.md/standards.md to describe the new structure and component/testing conventions. - Added widget tests for the noo/ component kit. This is a UI-only rework: no provider/model/service behavior changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
49 lines
1.5 KiB
Dart
49 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../../theme/design_tokens.dart';
|
|
|
|
/// Icon-only action button for the media viewer's floating chrome (top bar,
|
|
/// bottom action bar, video transport controls) - a fixed 22px icon in a
|
|
/// round hit box, colored from [NooColors] rather than Material's
|
|
/// [ColorScheme]. Kept as one small widget (matching the pre-rework
|
|
/// `_ActionIconButton` it replaces - see `styling.md`) so every floating
|
|
/// control in this screen looks the same instead of drifting apart across
|
|
/// the three call sites that need one.
|
|
class ViewerIconButton extends StatelessWidget {
|
|
final IconData icon;
|
|
final String tooltip;
|
|
final VoidCallback? onTap;
|
|
|
|
/// Overrides the default `fg-1` (e.g. `danger` for delete). Ignored while
|
|
/// [onTap] is null - a disabled button always dims to the same faded fg-1
|
|
/// regardless of its normal color.
|
|
final Color? color;
|
|
|
|
const ViewerIconButton({
|
|
super.key,
|
|
required this.icon,
|
|
required this.tooltip,
|
|
required this.onTap,
|
|
this.color,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colors = context.nooColors;
|
|
final fg = onTap == null
|
|
? colors.fg1.withValues(alpha: 0.4)
|
|
: (color ?? colors.fg1);
|
|
|
|
return Tooltip(
|
|
message: tooltip,
|
|
child: InkWell(
|
|
onTap: onTap,
|
|
customBorder: const CircleBorder(),
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
|
|
child: Icon(icon, color: fg, size: 22),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|