Add subtitle grid text fit setting: clip / wrap / ellipsis (#11590)#11594
Open
muaz978 wants to merge 1 commit into
Open
Add subtitle grid text fit setting: clip / wrap / ellipsis (#11590)#11594muaz978 wants to merge 1 commit into
muaz978 wants to merge 1 commit into
Conversation
…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.
Member
|
New language string will have to wait for 5.0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.