From 7844fc314deb233590bb291dcf22fda7158f7fe0 Mon Sep 17 00:00:00 2001 From: Ponshu Developer Date: Thu, 9 Apr 2026 19:27:25 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20UI=20tweaks=20=E2=80=94=20alcohol=20unit?= =?UTF-8?q?,=20title=20card=20layout,=20stats=20card?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - sake_detail_specs: アルコール分チラ見せを % → 度 に統一 - level_title_card: Lv.バッジを「現在の称号」行右寄せに移動、称号名36→26px・1行制限 - activity_stats: 小カード(お気に入り・撮影日数)を横並びレイアウトに変更 Co-Authored-By: Claude Sonnet 4.6 --- lib/widgets/gamification/activity_stats.dart | 72 ++++++------ .../gamification/level_title_card.dart | 104 ++++++++---------- .../sake_detail/sake_detail_specs.dart | 2 +- 3 files changed, 85 insertions(+), 93 deletions(-) diff --git a/lib/widgets/gamification/activity_stats.dart b/lib/widgets/gamification/activity_stats.dart index 67d1e80..a6a2c99 100644 --- a/lib/widgets/gamification/activity_stats.dart +++ b/lib/widgets/gamification/activity_stats.dart @@ -75,24 +75,28 @@ class ActivityStats extends ConsumerWidget { children: [ Expanded( child: _BentoCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: Row( children: [ Icon(LucideIcons.heart, size: 20, color: appColors.brandAccent), - const SizedBox(height: 8), - Text( - '$favoriteCount本', - style: TextStyle( - fontSize: 22, - fontWeight: FontWeight.w900, - color: appColors.textPrimary, - height: 1.0, - ), - ), - const SizedBox(height: 4), - Text( - 'お気に入り', - style: TextStyle(fontSize: 11, color: appColors.textSecondary), + const SizedBox(width: 10), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '$favoriteCount本', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w900, + color: appColors.textPrimary, + height: 1.0, + ), + ), + const SizedBox(height: 3), + Text( + 'お気に入り', + style: TextStyle(fontSize: 11, color: appColors.textSecondary), + ), + ], ), ], ), @@ -101,24 +105,28 @@ class ActivityStats extends ConsumerWidget { const SizedBox(width: 8), Expanded( child: _BentoCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: Row( children: [ Icon(LucideIcons.calendar, size: 20, color: appColors.iconDefault), - const SizedBox(height: 8), - Text( - '$recordingDays日', - style: TextStyle( - fontSize: 22, - fontWeight: FontWeight.w900, - color: appColors.textPrimary, - height: 1.0, - ), - ), - const SizedBox(height: 4), - Text( - '撮影日数', - style: TextStyle(fontSize: 11, color: appColors.textSecondary), + const SizedBox(width: 10), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '$recordingDays日', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w900, + color: appColors.textPrimary, + height: 1.0, + ), + ), + const SizedBox(height: 3), + Text( + '撮影日数', + style: TextStyle(fontSize: 11, color: appColors.textSecondary), + ), + ], ), ], ), diff --git a/lib/widgets/gamification/level_title_card.dart b/lib/widgets/gamification/level_title_card.dart index 8dc3fba..9ec3de2 100644 --- a/lib/widgets/gamification/level_title_card.dart +++ b/lib/widgets/gamification/level_title_card.dart @@ -49,70 +49,54 @@ class LevelTitleCard extends ConsumerWidget { ), const SizedBox(height: 6), ], + // 「現在の称号」ラベル行 + Lv.バッジを同行右寄せ Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text( - '現在の称号', - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontWeight: FontWeight.w500, - color: appColors.textSecondary, - letterSpacing: 0.5, - ), - ), - const SizedBox(width: 4), - ContextualHelpIcon( - title: 'レベルと称号について', - customContent: _buildLevelHelpContent(context), - ), - ], - ), - const SizedBox(height: 4), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Expanded( - child: Text( - title, - style: GoogleFonts.zenOldMincho( - fontSize: 36, - fontWeight: FontWeight.bold, - color: appColors.brandPrimary, - height: 1.1, - ), - ), - ), - Container( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), - margin: const EdgeInsets.only(bottom: 4, left: 8), // Align baseline-ish - decoration: BoxDecoration( - color: appColors.brandPrimary.withValues(alpha: 0.1), - borderRadius: BorderRadius.circular(12), - border: Border.all(color: appColors.brandPrimary.withValues(alpha: 0.3)), - ), - child: Text( - 'Lv.$level', - style: TextStyle( - fontWeight: FontWeight.w900, - fontSize: 16, - color: appColors.brandPrimary, - ), - ), - ), - ], - ), - ], - ), - ), - + Text( + '現在の称号', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w500, + color: appColors.textSecondary, + letterSpacing: 0.5, + ), + ), + const SizedBox(width: 4), + ContextualHelpIcon( + title: 'レベルと称号について', + customContent: _buildLevelHelpContent(context), + ), + const Spacer(), + Container( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), + decoration: BoxDecoration( + color: appColors.brandPrimary.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(10), + border: Border.all(color: appColors.brandPrimary.withValues(alpha: 0.3)), + ), + child: Text( + 'Lv.$level', + style: TextStyle( + fontWeight: FontWeight.w900, + fontSize: 14, + color: appColors.brandPrimary, + ), + ), + ), ], ), + const SizedBox(height: 6), + // 称号名(1行・フォントサイズ縮小・overflow防止) + Text( + title, + style: GoogleFonts.zenOldMincho( + fontSize: 26, + fontWeight: FontWeight.bold, + color: appColors.brandPrimary, + height: 1.2, + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), const SizedBox(height: 20), // Progress Bar (animated 0 → actual value on mount) diff --git a/lib/widgets/sake_detail/sake_detail_specs.dart b/lib/widgets/sake_detail/sake_detail_specs.dart index e893071..5b0c9ff 100644 --- a/lib/widgets/sake_detail/sake_detail_specs.dart +++ b/lib/widgets/sake_detail/sake_detail_specs.dart @@ -188,7 +188,7 @@ class _SakeDetailSpecsState extends State { const SizedBox(width: 10), if (widget.sake.hiddenSpecs.alcoholContent != null) _buildPeekChip( - '${widget.sake.hiddenSpecs.alcoholContent}%', + '${widget.sake.hiddenSpecs.alcoholContent}度', appColors, ), if (widget.sake.hiddenSpecs.polishingRatio != null) ...[