From 50bc5a5a20ddd8aeab04121cf3a5636a4a14e8db Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 24 Dec 2025 04:06:33 -0800 Subject: [PATCH] =?UTF-8?q?fix(stickman):=20=E4=BD=BF=E7=94=A8=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E5=AF=B9=E9=BD=90=E5=AE=9E=E7=8E=B0=E6=98=B5=E7=A7=B0?= =?UTF-8?q?=E4=B8=8E=E6=95=B0=E9=87=8F=E6=A0=87=E7=AD=BE=E7=9A=84=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 昵称标签和数量标签高度相同,顶部对齐即可实现水平中心对齐 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../widgets/stickman_race_widget.dart | 55 +++++++++---------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart b/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart index 802d6aad..9dc34733 100644 --- a/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart +++ b/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart @@ -256,38 +256,35 @@ class _StickmanRaceWidgetState extends State top: verticalPosition - bounce, child: Row( mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.end, // 底部对齐 + crossAxisAlignment: CrossAxisAlignment.start, // 顶部对齐,昵称和数量标签高度相同,自然中心对齐 children: [ - // 昵称标签 - 固定在左边,与数量标签底部对齐 - Padding( - padding: const EdgeInsets.only(bottom: 38), // 火柴人高度36 + 间距2 - child: SizedBox( - width: nicknameAreaWidth, - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), - decoration: BoxDecoration( + // 昵称标签 - 与数量标签顶部对齐(两者高度相近,实现中心对齐) + SizedBox( + width: nicknameAreaWidth, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), + decoration: BoxDecoration( + color: data.isCurrentUser + ? const Color(0xFFD4AF37).withValues(alpha: 0.2) + : Colors.white.withValues(alpha: 0.8), + borderRadius: BorderRadius.circular(4), + border: data.isCurrentUser + ? Border.all(color: const Color(0xFFD4AF37), width: 1) + : null, + ), + child: Text( + data.nickname, + style: TextStyle( + fontSize: 9, + fontFamily: 'Inter', + fontWeight: + data.isCurrentUser ? FontWeight.w600 : FontWeight.w400, color: data.isCurrentUser - ? const Color(0xFFD4AF37).withValues(alpha: 0.2) - : Colors.white.withValues(alpha: 0.8), - borderRadius: BorderRadius.circular(4), - border: data.isCurrentUser - ? Border.all(color: const Color(0xFFD4AF37), width: 1) - : null, - ), - child: Text( - data.nickname, - style: TextStyle( - fontSize: 9, - fontFamily: 'Inter', - fontWeight: - data.isCurrentUser ? FontWeight.w600 : FontWeight.w400, - color: data.isCurrentUser - ? const Color(0xFFD4AF37) - : const Color(0xFF5D4037), - ), - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, + ? const Color(0xFFD4AF37) + : const Color(0xFF5D4037), ), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, ), ), ),