Problem Description
When toggling a hymn between Score (images) and Lyrics (lyrics) view modes, the Title Slide undergoes unexpected background sizing and image scaling changes:
-
Image Fit / Scaling Inconsistency:
- In
SlideCompositionWidget(slide_composition_widget.dart),imageFitis computed as:imageFit: slide.viewMode == 'images' ? sheetMusicStyle.objectFit : ((slide.slideStyle ?? slideStyle).bgImageFit.isNotEmpty ? (slide.slideStyle ?? slideStyle).bgImageFit : 'fill'), - In
slide_compiler.dart, the title slide inheritsviewMode = effectiveHymnMode. When toggling from Score to Lyrics,viewModechanges fromimagestolyrics, causingimageFitto abruptly flip fromsheetMusicStyle.objectFit(typicallycontain) toslideStyle.bgImageFit(defaulting tofill). This stretches or distorts the title slide asset.
- In
-
Render vs Export Divergence:
- In
SharedSlideCompositionWidget, ifimageBytesis present on the title slide, it renders the raw image asset. - In
SlideExportService(slide_export_service.dart), title slides explicitly bypassimageBytes(!slide.isTitle) and render slide text (_drawSlideText) over the slide background. - This creates an inconsistency between in-app rendering / live presentation and exported assets (PDF/PNG/PPTX).
- In
-
Properties Pane Configuration:
- In
properties_pane.dart, both the Sheet Music styling section (if (isScore && !isTitleSlide)) and the Background section (if (!isTitleSlide && ...)) hide controls when a title slide is selected. - Users cannot configure or control the background mode, size, and fit specifically for title slides.
- In
Proposed Solution
- Stabilize Title Slide Image Sizing & Fit:
- Decouple title slide image scaling from hymn view mode flips, ensuring consistent aspect ratio retention (
contain/fitWidthor explicit title slide image fit).
- Decouple title slide image scaling from hymn view mode flips, ensuring consistent aspect ratio retention (
- Align Live Viewer & Export Pipeline:
- Standardize whether title slides display rendered score title assets or styled title text across
SharedSlideCompositionWidget,SlideExportService, and PPTX export.
- Standardize whether title slides display rendered score title assets or styled title text across
- Properties Pane Support:
- Allow configuring background and image presentation settings for title slides.