fix: weather card spacing and sizing consistency

- Consistent 8px vertical rhythm (was 6/4/10 mix)
- Larger current temp (36px vs 32px) for better visual weight
- Fixed 64px forecast column width prevents uneven wrapping
- Forecast condition text clipped at 2 lines with ellipsis
- 12px spacing around forecast divider

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-26 17:36:53 -04:00
parent 46d0427901
commit 9f524e158d
+15 -9
View File
@@ -95,7 +95,7 @@ class WeatherCard extends StatelessWidget {
), ),
], ],
), ),
const SizedBox(height: 6), const SizedBox(height: 8),
// Current temp + condition // Current temp + condition
Row( Row(
crossAxisAlignment: CrossAxisAlignment.baseline, crossAxisAlignment: CrossAxisAlignment.baseline,
@@ -104,7 +104,7 @@ class WeatherCard extends StatelessWidget {
Text( Text(
'$currentTemp°', '$currentTemp°',
style: TextStyle( style: TextStyle(
fontSize: 32, fontSize: 36,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: scheme.onSurface, color: scheme.onSurface,
height: 1, height: 1,
@@ -122,7 +122,7 @@ class WeatherCard extends StatelessWidget {
), ),
// Today high/low + delta // Today high/low + delta
if (todayHigh != null) ...[ if (todayHigh != null) ...[
const SizedBox(height: 4), const SizedBox(height: 8),
Text( Text(
'Today: $todayHigh° / $todayLow°' 'Today: $todayHigh° / $todayLow°'
'${tempDelta != null ? ' · $tempDelta' : ''}', '${tempDelta != null ? ' · $tempDelta' : ''}',
@@ -131,15 +131,18 @@ class WeatherCard extends StatelessWidget {
], ],
// Forecast strip // Forecast strip
if (forecast.isNotEmpty) ...[ if (forecast.isNotEmpty) ...[
const SizedBox(height: 10), const SizedBox(height: 12),
const Divider(height: 1), const Divider(height: 1),
const SizedBox(height: 10), const SizedBox(height: 12),
SingleChildScrollView( SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: Row( child: Row(
spacing: 16, spacing: 8,
children: forecast.map((day) { children: forecast.map((day) {
return Column( return SizedBox(
width: 64,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
day['day'] as String? ?? '', day['day'] as String? ?? '',
@@ -149,7 +152,7 @@ class WeatherCard extends StatelessWidget {
color: scheme.onSurface, color: scheme.onSurface,
), ),
), ),
const SizedBox(height: 2), const SizedBox(height: 3),
Text( Text(
day['condition'] as String? ?? '', day['condition'] as String? ?? '',
style: TextStyle( style: TextStyle(
@@ -157,8 +160,10 @@ class WeatherCard extends StatelessWidget {
color: scheme.onSurfaceVariant, color: scheme.onSurfaceVariant,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
), ),
const SizedBox(height: 2), const SizedBox(height: 3),
Text( Text(
'${day['high']}° / ${day['low']}°', '${day['high']}° / ${day['low']}°',
style: TextStyle( style: TextStyle(
@@ -167,6 +172,7 @@ class WeatherCard extends StatelessWidget {
), ),
), ),
], ],
),
); );
}).toList(), }).toList(),
), ),