fix;设置和深浅色
This commit is contained in:
@@ -4,7 +4,6 @@ import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
import '../data/models/models.dart';
|
||||
import '../theme/app_icons.dart';
|
||||
import '../theme/yanting_text.dart';
|
||||
import '../theme/yanting_tokens.dart';
|
||||
import '../theme/wise_tokens.dart';
|
||||
import 'app_buttons.dart';
|
||||
import 'app_card.dart';
|
||||
@@ -60,13 +59,14 @@ class MiniPlayer extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!player.hasAudio) return const SizedBox.shrink();
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
final ratio = player.durationSec == 0
|
||||
? 0.0
|
||||
: player.positionSec / player.durationSec;
|
||||
return DecoratedBox(
|
||||
decoration: const BoxDecoration(
|
||||
color: YantingColors.secondary,
|
||||
border: Border(top: BorderSide(color: YantingColors.border)),
|
||||
decoration: BoxDecoration(
|
||||
color: colors.secondary,
|
||||
border: Border(top: BorderSide(color: colors.border)),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
@@ -78,9 +78,9 @@ class MiniPlayer extends StatelessWidget {
|
||||
alignment: Alignment.centerLeft,
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: ratio.clamp(0, 1),
|
||||
child: const SizedBox(
|
||||
child: SizedBox(
|
||||
height: 2,
|
||||
child: ColoredBox(color: YantingColors.primary),
|
||||
child: ColoredBox(color: colors.primary),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -93,12 +93,12 @@ class MiniPlayer extends StatelessWidget {
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
color: YantingColors.primary,
|
||||
color: colors.primary,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: const Icon(
|
||||
child: Icon(
|
||||
AppIcons.disc,
|
||||
color: YantingColors.primaryForeground,
|
||||
color: colors.primaryForeground,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
@@ -113,7 +113,7 @@ class MiniPlayer extends StatelessWidget {
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: YantingText.meta.copyWith(
|
||||
color: YantingColors.foreground,
|
||||
color: colors.foreground,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFeatures: null,
|
||||
),
|
||||
@@ -169,9 +169,10 @@ class PlayerCard extends StatelessWidget {
|
||||
final active = player.hasAudio && player.title == title;
|
||||
final position = active ? player.positionSec : 0;
|
||||
final ratio = durationSec == 0 ? 0.0 : position / durationSec;
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
return AppCard(
|
||||
color: YantingColors.secondary,
|
||||
borderColor: YantingColors.border,
|
||||
color: colors.secondary,
|
||||
borderColor: colors.border,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -255,17 +256,18 @@ class _SkipButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
return TextButton(
|
||||
onPressed: onPressed,
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: YantingColors.foreground,
|
||||
foregroundColor: colors.foreground,
|
||||
minimumSize: const Size(40, 40),
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
child: Text(
|
||||
label,
|
||||
style: YantingText.meta.copyWith(
|
||||
color: YantingColors.foreground,
|
||||
color: colors.foreground,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user