Free up vertical space so bullet text grows larger
Two reserved bands kept checklist/bullet slides from using the available height, leaving the text small with an empty band below it: - Tighten the logo safe-area reserve to match the split-layout reserve (logoSize + 24 instead of + 64); it still clears the logo. - Use a slightly smaller top/bottom margin than the side margin in the single-column bullets layout. Combined with the as-rendered measurement fix, short checklists now grow to fill more of the slide height while margins stay tidy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
4ab1fa5f44
commit
167cc63c49
1 changed files with 10 additions and 4 deletions
|
|
@ -90,7 +90,9 @@ Color _hexColor(String hex) {
|
||||||
|
|
||||||
EdgeInsets _logoSafeInsets(double w, ThemeProfile profile) {
|
EdgeInsets _logoSafeInsets(double w, ThemeProfile profile) {
|
||||||
if (profile.logoPath?.isEmpty ?? true) return EdgeInsets.zero;
|
if (profile.logoPath?.isEmpty ?? true) return EdgeInsets.zero;
|
||||||
final reserved = w * ((profile.logoSize + 64) / 1280);
|
// Reserve just enough to clear the logo plus a small margin (matching the
|
||||||
|
// split-layout reserve). A larger margin needlessly shrinks the text area.
|
||||||
|
final reserved = w * ((profile.logoSize + 24) / 1280);
|
||||||
if (profile.logoPosition.startsWith('top')) {
|
if (profile.logoPosition.startsWith('top')) {
|
||||||
return EdgeInsets.only(top: reserved);
|
return EdgeInsets.only(top: reserved);
|
||||||
}
|
}
|
||||||
|
|
@ -658,6 +660,10 @@ class _BulletsPreview extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final pad = w * 0.07;
|
final pad = w * 0.07;
|
||||||
|
// Slightly tighter top/bottom margin than the side margin so short
|
||||||
|
// checklists can grow into more of the slide height instead of leaving a
|
||||||
|
// wide empty band below the text.
|
||||||
|
final vPad = w * 0.05;
|
||||||
final safe = slide.showLogo ? _logoSafeInsets(w, profile) : EdgeInsets.zero;
|
final safe = slide.showLogo ? _logoSafeInsets(w, profile) : EdgeInsets.zero;
|
||||||
final titleSize = w * 0.042;
|
final titleSize = w * 0.042;
|
||||||
final subtitleSize = w * 0.030;
|
final subtitleSize = w * 0.030;
|
||||||
|
|
@ -685,7 +691,7 @@ class _BulletsPreview extends StatelessWidget {
|
||||||
final textAvailW = showProgress
|
final textAvailW = showProgress
|
||||||
? (availW - progressGap - progressW).clamp(w * 0.12, availW)
|
? (availW - progressGap - progressW).clamp(w * 0.12, availW)
|
||||||
: availW;
|
: availW;
|
||||||
final availH = slideHeight - (pad + safe.top) - (pad + safe.bottom);
|
final availH = slideHeight - (vPad + safe.top) - (vPad + safe.bottom);
|
||||||
// Grow (or, when needed, shrink) the text so it uses the full vertical
|
// Grow (or, when needed, shrink) the text so it uses the full vertical
|
||||||
// space instead of leaving a large empty area below a few short bullets.
|
// space instead of leaving a large empty area below a few short bullets.
|
||||||
final scale = _bulletsFitScale(
|
final scale = _bulletsFitScale(
|
||||||
|
|
@ -716,9 +722,9 @@ class _BulletsPreview extends StatelessWidget {
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.fromLTRB(
|
padding: EdgeInsets.fromLTRB(
|
||||||
pad,
|
pad,
|
||||||
pad + safe.top,
|
vPad + safe.top,
|
||||||
pad,
|
pad,
|
||||||
pad + safe.bottom,
|
vPad + safe.bottom,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue