Add subtitle grid text fit setting: clip / wrap / ellipsis (#11590)#11594
Add subtitle grid text fit setting: clip / wrap / ellipsis (#11590)#11594muaz978 wants to merge 1 commit into
Conversation
|
New language string will have to wait for 5.0.1 |
dc92b4a to
a7702ca
Compare
|
Rebased this branch onto the latest main. This is purely a sync, no functional changes: it just confirms this stays conflict-free and cleanly mergeable against current main. |
|
Please add screenshots - also how does this work with the current one-line-setting with string separator? |
|
Screenshots coming shortly. On how this composes with the existing "show subtitle text as single line" + separator setting: the two are independent layers and mostly compose cleanly.
The new display mode (Clip / Wrap / Ellipsis) is applied afterward, purely as One real edge case from that: with Ellipsis mode and the separator setting OFF (so subtitle lines keep a real line break), If you would rather Ellipsis always show something from every original line (e.g. truncate each line's tail instead of dropping line 2 outright), that is a small follow-up change I am happy to make, just say the word. |
…dit#11590) The grid Text and Original columns were hardcoded to NoWrap, so long lines were clipped at the column edge and multi-line subtitles produced very tall rows. Add an appearance setting "Subtitle text fit in grid" with three modes so the visible text can adapt to the window size: - Clip (default, unchanged): no wrap, long lines clipped at the edge - Wrap to fit window: text wraps to the column width, rows grow to fit - Single line with ellipsis: one line, truncated with an ellipsis Modelled on the existing grid-lines-visibility dropdown; the mode is applied when the grid is (re)built (i.e. on Settings OK). Default Clip preserves the current behaviour, and it composes with the existing single-line setting.
a7702ca to
a5cb781
Compare

Implements #11590 - an auto-fit setting for the subtitle grid so the visible text adapts to the window size.
Background
The grid Text and Original columns were hardcoded to
TextWrapping.NoWrap, so long lines are clipped at the column edge (you can't see the rest without widening) and multi-line subtitles produce very tall rows.Change
Adds an appearance setting "Subtitle text fit in grid" (Settings -> Appearance) with three modes:
NoWrap, long lines clipped at the edge.TextWrapping.Wrap; text reflows to the column width and rows grow to show the full text (this is what the screenshot in the issue shows).NoWrap+MaxLines=1+CharacterEllipsis; one compact line, truncated with an ellipsis that adapts to the column (window) width.It is modelled on the existing grid-lines-visibility dropdown: a
SubtitleGridTextDisplayModeenum + display list, persisted inSeAppearance.SubtitleGridTextDisplay(stored as the mode name, defaultClip). The mode is applied where the Text/Original cell templates are built, so it takes effect when the grid is rebuilt on Settings OK - the same pathGridCompactMode/ grid-lines use. It composes with the existingSubtitleGridTextSingleLinejoin setting.Notes
Clippreserves current behaviour exactly; no migration needed (missing/old setting parses toClip).LanguageSettings.cs; other language JSONs fall back to those until translated.