fix(ui): 对齐首页样式到 Pencil 设计规范
- Asset Card: padding 20px (was 24px) - 充值按钮: cornerRadius 6px, padding [5,10], icon 13px, text 12px - Quick Actions: 边框颜色 Light #E2E8F0, Dark #1E293B - Quick Action Icons: 背景色 Light #F3F4F6, Dark #1E293B - Quick Action Icons: 图标色 Light #4B5563 - cornerRadius: -lg (14px) for cards
This commit is contained in:
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"e4b8dca3f1b4ede4c30371002441c88c12187e
|
|||||||
|
|
||||||
_flutter.loader.load({
|
_flutter.loader.load({
|
||||||
serviceWorkerSettings: {
|
serviceWorkerSettings: {
|
||||||
serviceWorkerVersion: "576740159" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
serviceWorkerVersion: "3091076511" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -524,7 +524,7 @@ class _AssetCardState extends State<_AssetCard> {
|
|||||||
final displayAsset = _formatAsset(totalAsset);
|
final displayAsset = _formatAsset(totalAsset);
|
||||||
|
|
||||||
return GlassPanel(
|
return GlassPanel(
|
||||||
padding: EdgeInsets.all(AppSpacing.lg),
|
padding: EdgeInsets.all(20),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@@ -540,22 +540,23 @@ class _AssetCardState extends State<_AssetCard> {
|
|||||||
onTap: widget.onDeposit,
|
onTap: widget.onDeposit,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: AppSpacing.md,
|
horizontal: 10,
|
||||||
vertical: AppSpacing.xs + 2,
|
vertical: 5,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: context.colors.primary,
|
color: context.colors.primary,
|
||||||
borderRadius: BorderRadius.circular(AppRadius.full),
|
borderRadius: BorderRadius.circular(AppRadius.sm),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.add, size: 14, color: context.colors.onPrimary),
|
Icon(Icons.add, size: 13, color: context.colors.onPrimary),
|
||||||
SizedBox(width: AppSpacing.xs),
|
SizedBox(width: 4),
|
||||||
Text(
|
Text(
|
||||||
'充值',
|
'充值',
|
||||||
style: AppTextStyles.labelLarge(context).copyWith(
|
style: AppTextStyles.labelLarge(context).copyWith(
|
||||||
color: context.colors.onPrimary,
|
color: context.colors.onPrimary,
|
||||||
|
fontSize: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -21,16 +21,27 @@ class QuickActionsRow extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final colorScheme = Theme.of(context).colorScheme;
|
final colorScheme = Theme.of(context).colorScheme;
|
||||||
|
final isDark = colorScheme.brightness == Brightness.dark;
|
||||||
|
|
||||||
|
// Light: #FFFFFF, Dark: #0F172A
|
||||||
|
final containerBg = isDark
|
||||||
|
? const Color(0xFF0F172A)
|
||||||
|
: const Color(0xFFFFFFFF);
|
||||||
|
|
||||||
|
// Light: #E2E8F0, Dark: #1E293B
|
||||||
|
final borderColor = isDark
|
||||||
|
? const Color(0xFF1E293B)
|
||||||
|
: const Color(0xFFE2E8F0);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: AppSpacing.md, horizontal: AppSpacing.sm),
|
padding: const EdgeInsets.symmetric(vertical: AppSpacing.md, horizontal: AppSpacing.sm),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: colorScheme.surfaceContainer,
|
color: containerBg,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: colorScheme.outlineVariant,
|
color: borderColor,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(AppRadius.xl),
|
borderRadius: BorderRadius.circular(AppRadius.lg),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
@@ -80,6 +91,17 @@ class _ActionItem extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
// Light: #F3F4F6, Dark: #1E293B
|
||||||
|
final isDark = colorScheme.brightness == Brightness.dark;
|
||||||
|
final iconBgColor = isDark
|
||||||
|
? const Color(0xFF1E293B)
|
||||||
|
: const Color(0xFFF3F4F6);
|
||||||
|
|
||||||
|
// Light: #4B5563, Dark: 根据主题
|
||||||
|
final iconColor = isDark
|
||||||
|
? colorScheme.onSurfaceVariant
|
||||||
|
: const Color(0xFF4B5563);
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
@@ -90,14 +112,14 @@ class _ActionItem extends StatelessWidget {
|
|||||||
width: 40,
|
width: 40,
|
||||||
height: 40,
|
height: 40,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: colorScheme.surfaceContainerHigh,
|
color: iconBgColor,
|
||||||
borderRadius: BorderRadius.circular(AppRadius.md),
|
borderRadius: BorderRadius.circular(AppRadius.md),
|
||||||
),
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
icon,
|
icon,
|
||||||
size: 18,
|
size: 18,
|
||||||
color: colorScheme.onSurfaceVariant,
|
color: iconColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: AppSpacing.xs + 2),
|
const SizedBox(height: AppSpacing.xs + 2),
|
||||||
|
|||||||
Reference in New Issue
Block a user