From 3ca94771b95add318f3475bbc599d4ec0469766c Mon Sep 17 00:00:00 2001 From: Brenno de Winter Date: Tue, 9 Jun 2026 15:57:50 +0200 Subject: [PATCH] Balance checklist progress chart against the bullet column Cap the progress pie to a smaller, fixed slot and give the freed width to the bullets. This keeps the visual split closer to 50/50 instead of letting the chart dominate, and lets the text grow to use the full slide height so it stays readable on checklists with many items. Co-Authored-By: Claude Opus 4.8 --- lib/widgets/slides/slide_preview.dart | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/widgets/slides/slide_preview.dart b/lib/widgets/slides/slide_preview.dart index b374ef1..e49fd06 100644 --- a/lib/widgets/slides/slide_preview.dart +++ b/lib/widgets/slides/slide_preview.dart @@ -677,8 +677,13 @@ class _BulletsPreview extends StatelessWidget { final slideHeight = w * 9 / 16; final availW = (w - pad * 2).clamp(w * 0.12, w); + // The progress chart only needs a modest, fixed slot; give all remaining + // width to the bullets so the text can grow as large (and readable) as + // possible, especially on slides with many checklist items. + final progressGap = w * 0.025; + final progressW = w * 0.34; final textAvailW = showProgress - ? ((availW - w * 0.025) / 2).clamp(w * 0.12, availW) + ? (availW - progressGap - progressW).clamp(w * 0.12, availW) : availW; final availH = slideHeight - (pad + safe.top) - (pad + safe.bottom); // Grow (or, when needed, shrink) the text so it uses the full vertical @@ -766,8 +771,9 @@ class _BulletsPreview extends StatelessWidget { ), ), if (showProgress) ...[ - SizedBox(width: w * 0.025), - Expanded( + SizedBox(width: progressGap), + SizedBox( + width: progressW, child: Center( child: _ChecklistProgress( bullets: bullets, @@ -1401,7 +1407,11 @@ class _ChecklistProgress extends StatelessWidget { final maxW = constraints.maxWidth.isFinite ? constraints.maxWidth : w * 0.4; - final diameter = maxW.clamp(w * 0.26, w * 0.38).toDouble(); + // Cap the pie so it stays a balanced companion to the bullet column + // rather than dominating it: a smaller chart keeps the visual split + // closer to 50/50 and, crucially, never forces the surrounding text to + // shrink to fit the chart's height when a slide has many bullets. + final diameter = maxW.clamp(w * 0.22, w * 0.30).toDouble(); final baseRadius = diameter * 0.44; final hoverRadius = diameter * 0.48; final pieTitleStyle = _applyFont(