fix: 修复UI样式问题
- 首页:移除盈亏日历,福利中心卡片改为白色背景,查看按钮改为黄色 - 资产页面:余额卡片撑满宽度 - 底部导航栏:移除背景高亮,只保留图标和文字变化 - 行情页面:调整卡片文字大小和柱形图样式 - 交易页面:买入按钮白色文字,卖出按钮红色文字,优化输入框和百分比卡片样式,添加顶部间距 - 全局:移除渐变色,统一使用纯色背景
This commit is contained in:
@@ -63,7 +63,7 @@ class _AmountInputState extends State<AmountInput> {
|
||||
Container(
|
||||
height: 48,
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.surfaceContainerHighest.withOpacity(0.3),
|
||||
color: colorScheme.surfaceContainerHighest.withOpacity(0.5), // 调整透明度
|
||||
borderRadius: BorderRadius.circular(AppRadius.md),
|
||||
),
|
||||
child: TextField(
|
||||
|
||||
@@ -5,7 +5,7 @@ import '../../../../core/theme/app_theme.dart';
|
||||
|
||||
/// 交易按钮组件
|
||||
///
|
||||
/// CTA 买入/卖出按钮。profit-green底 / sell-red底,圆角lg,高48,白字16px bold。
|
||||
/// CTA 买入/卖出按钮。profit-green底 / sell-red底,圆角lg,高48,买入白字/卖出红字16px bold。
|
||||
class TradeButton extends StatelessWidget {
|
||||
final bool isBuy;
|
||||
final String? coinCode;
|
||||
@@ -27,6 +27,10 @@ class TradeButton extends StatelessWidget {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
final fillColor =
|
||||
isBuy ? AppColorScheme.buyButtonFill : AppColorScheme.sellButtonFill;
|
||||
// 买入按钮文字为白色,卖出按钮文字为红色
|
||||
final textColor = isBuy
|
||||
? Colors.white
|
||||
: (enabled ? AppColorScheme.sellButtonFill : colorScheme.onSurface.withOpacity(0.3));
|
||||
|
||||
return GestureDetector(
|
||||
onTap: enabled ? onPressed : null,
|
||||
@@ -39,19 +43,19 @@ class TradeButton extends StatelessWidget {
|
||||
),
|
||||
child: Center(
|
||||
child: isLoading
|
||||
? const SizedBox(
|
||||
? SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: AppColorScheme.darkOnPrimary,
|
||||
color: isBuy ? Colors.white : AppColorScheme.sellButtonFill,
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'${isBuy ? '买入' : '卖出'} ${coinCode ?? ""}',
|
||||
style: AppTextStyles.headlineLarge(context).copyWith(
|
||||
color: enabled
|
||||
? AppColorScheme.darkOnPrimary
|
||||
? textColor
|
||||
: colorScheme.onSurface.withOpacity(0.3),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -207,7 +207,7 @@ class TradeFormCard extends StatelessWidget {
|
||||
child: Container(
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
color: context.colors.surfaceContainerHighest, // 移除 0.5 透明度
|
||||
color: context.colors.surfaceContainerHighest.withOpacity(0.5), // 更柔和的颜色
|
||||
borderRadius: BorderRadius.circular(AppRadius.sm),
|
||||
),
|
||||
child: Center(
|
||||
|
||||
@@ -121,7 +121,7 @@ class _TradePageState extends State<TradePage>
|
||||
return SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
AppSpacing.md, 0, AppSpacing.md, AppSpacing.xl + AppSpacing.sm,
|
||||
AppSpacing.md, AppSpacing.md, AppSpacing.md, AppSpacing.xl + AppSpacing.sm, // 添加顶部间距
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user