updates
This commit is contained in:
parent
2ce32cac4e
commit
b6639fb1c9
26 changed files with 454 additions and 204 deletions
|
|
@ -134,14 +134,14 @@ class _LabelArt extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (artUri == null) {
|
||||
return const ColoredBox(color: TimbreColors.surface);
|
||||
return ColoredBox(color: TimbreColors.surface);
|
||||
}
|
||||
return Image.network(
|
||||
artUri!,
|
||||
key: ValueKey(artUri),
|
||||
fit: BoxFit.cover, // square art → wide label: crop the sides/top
|
||||
gaplessPlayback: true,
|
||||
errorBuilder: (_, _, _) => const ColoredBox(color: TimbreColors.surface),
|
||||
errorBuilder: (_, _, _) => ColoredBox(color: TimbreColors.surface),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class HairlinePanel extends StatelessWidget {
|
|||
this.action,
|
||||
this.active = false,
|
||||
this.padding = const EdgeInsets.all(TimbreSpacing.lg),
|
||||
this.backgroundColor = TimbreColors.background,
|
||||
this.backgroundColor,
|
||||
});
|
||||
|
||||
/// Panel label, e.g. "Queue". Rendered uppercase-ish in mono.
|
||||
|
|
@ -40,12 +40,13 @@ class HairlinePanel extends StatelessWidget {
|
|||
|
||||
/// Color painted behind the title to "cut" the border. Must match whatever
|
||||
/// sits behind this panel (the canvas by default).
|
||||
final Color backgroundColor;
|
||||
final Color? backgroundColor;
|
||||
|
||||
static const double _titleStraddle = 8;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bg = backgroundColor ?? TimbreColors.background;
|
||||
final borderColor =
|
||||
active ? TimbreColors.borderActive : TimbreColors.border;
|
||||
final titleColor =
|
||||
|
|
@ -65,7 +66,7 @@ class HairlinePanel extends StatelessWidget {
|
|||
left: TimbreSpacing.lg,
|
||||
top: 0,
|
||||
child: Container(
|
||||
color: backgroundColor,
|
||||
color: bg,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: TimbreSpacing.md,
|
||||
),
|
||||
|
|
@ -83,7 +84,7 @@ class HairlinePanel extends StatelessWidget {
|
|||
if (trailing != null)
|
||||
TextSpan(
|
||||
text: ' $trailing',
|
||||
style: const TextStyle(color: TimbreColors.dimmed),
|
||||
style: TextStyle(color: TimbreColors.dimmed),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -96,7 +97,7 @@ class HairlinePanel extends StatelessWidget {
|
|||
right: TimbreSpacing.md,
|
||||
top: 0,
|
||||
child: Container(
|
||||
color: backgroundColor,
|
||||
color: bg,
|
||||
padding: const EdgeInsets.symmetric(horizontal: TimbreSpacing.xs),
|
||||
child: action,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class MiniPlayer extends ConsumerWidget {
|
|||
current.title ?? 'Untitled',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
color: TimbreColors.foreground,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
|
|
@ -77,7 +77,7 @@ class MiniPlayer extends ConsumerWidget {
|
|||
current.artist ?? 'Unknown artist',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(color: TimbreColors.dimmed),
|
||||
style: TextStyle(color: TimbreColors.dimmed),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -95,12 +95,11 @@ class MiniPlayer extends ConsumerWidget {
|
|||
);
|
||||
}
|
||||
|
||||
Widget _btn(IconData icon, VoidCallback onTap,
|
||||
{Color color = TimbreColors.foreground}) {
|
||||
Widget _btn(IconData icon, VoidCallback onTap, {Color? color}) {
|
||||
return IconButton(
|
||||
onPressed: onTap,
|
||||
visualDensity: VisualDensity.compact,
|
||||
icon: Icon(icon, color: color, size: 24),
|
||||
icon: Icon(icon, color: color ?? TimbreColors.foreground, size: 24),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -129,7 +128,7 @@ class _MiniProgress extends ConsumerWidget {
|
|||
class _ArtFallback extends StatelessWidget {
|
||||
const _ArtFallback();
|
||||
@override
|
||||
Widget build(BuildContext context) => const Center(
|
||||
Widget build(BuildContext context) => Center(
|
||||
child: Icon(Icons.album_outlined,
|
||||
color: TimbreColors.dimmed, size: 22),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ void showToast(BuildContext context, String message, {IconData? icon}) {
|
|||
Expanded(
|
||||
child: Text(
|
||||
message,
|
||||
style: const TextStyle(color: TimbreColors.foreground),
|
||||
style: TextStyle(color: TimbreColors.foreground),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue