Skip to content

Commit e4cdb40

Browse files
CollotsSpotclaude
andcommitted
Fix home screen gradient obscuring third row text
Only show the bottom fade gradient when 4+ rows are enabled, since with ≤3 rows the content doesn't scroll behind the mini player. Reduce gradient height to mini player height only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ad5ecf5 commit e4cdb40

1 file changed

Lines changed: 20 additions & 22 deletions

File tree

lib/screens/new_home_screen.dart

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -430,29 +430,28 @@ class _NewHomeScreenState extends State<NewHomeScreen> with AutomaticKeepAliveCl
430430
),
431431
),
432432
),
433-
// Bottom fade gradient to mask content behind mini player
434-
Positioned(
435-
left: 0,
436-
right: 0,
437-
bottom: 0,
438-
height: BottomSpacing.miniPlayerHeight + 22.0,
439-
child: IgnorePointer(
440-
child: DecoratedBox(
441-
decoration: BoxDecoration(
442-
gradient: LinearGradient(
443-
begin: Alignment.topCenter,
444-
end: Alignment.bottomCenter,
445-
colors: [
446-
colorScheme.background.withOpacity(0.0),
447-
colorScheme.background.withOpacity(0.25),
448-
colorScheme.background.withOpacity(0.85),
449-
],
450-
stops: const [0.0, 0.5, 1.0],
433+
// Bottom fade gradient to mask content behind mini player (4+ rows only)
434+
if (_countEnabledRows() >= 4)
435+
Positioned(
436+
left: 0,
437+
right: 0,
438+
bottom: 0,
439+
height: BottomSpacing.miniPlayerHeight,
440+
child: IgnorePointer(
441+
child: DecoratedBox(
442+
decoration: BoxDecoration(
443+
gradient: LinearGradient(
444+
begin: Alignment.topCenter,
445+
end: Alignment.bottomCenter,
446+
colors: [
447+
colorScheme.background.withOpacity(0.0),
448+
colorScheme.background.withOpacity(0.85),
449+
],
450+
),
451451
),
452452
),
453453
),
454454
),
455-
),
456455
],
457456
);
458457
},
@@ -503,9 +502,8 @@ class _NewHomeScreenState extends State<NewHomeScreen> with AutomaticKeepAliveCl
503502
builder: (context, constraints) {
504503
// Each row is always 1/3 of screen height
505504
// 1 row = 1/3, 2 rows = 2/3, 3 rows = full screen, 4+ rows scroll
506-
// With extendBody: true, constraints include the area behind the nav bar.
507-
// Subtract mini player overlay space (mini player + its margins sit above the nav bar).
508-
final miniPlayerSpace = BottomSpacing.miniPlayerHeight + 22.0; // 84 + 22 = 106
505+
// Reserve space for the mini player overlay at the bottom.
506+
final miniPlayerSpace = BottomSpacing.miniPlayerHeight + 22.0;
509507
final availableHeight = constraints.maxHeight - miniPlayerSpace;
510508

511509
// Account for margins between rows (2px each, 2 margins for 3 rows).

0 commit comments

Comments
 (0)