Skip to content

Add subtitle grid text fit setting: clip / wrap / ellipsis (#11590)#11594

Open
muaz978 wants to merge 1 commit into
SubtitleEdit:mainfrom
muaz978:feature/grid-text-autofit
Open

Add subtitle grid text fit setting: clip / wrap / ellipsis (#11590)#11594
muaz978 wants to merge 1 commit into
SubtitleEdit:mainfrom
muaz978:feature/grid-text-autofit

Conversation

@muaz978

@muaz978 muaz978 commented Jun 13, 2026

Copy link
Copy Markdown

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:

  • Clip (single line) - default, unchanged: NoWrap, long lines clipped at the edge.
  • Wrap to fit window - 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).
  • Single line with ellipsis - 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 SubtitleGridTextDisplayMode enum + display list, persisted in SeAppearance.SubtitleGridTextDisplay (stored as the mode name, default Clip). 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 path GridCompactMode / grid-lines use. It composes with the existing SubtitleGridTextSingleLine join setting.

Notes

  • Default Clip preserves current behaviour exactly; no migration needed (missing/old setting parses to Clip).
  • English strings added in LanguageSettings.cs; other language JSONs fall back to those until translated.
  • Builds clean (0 warnings / 0 errors).
  • I don't have a Windows/macOS GUI here to judge the look, so I also produced portable Windows and macOS test builds from this branch so the feel of each mode (especially row growth in Wrap) can be confirmed. Happy to adjust defaults, naming, or where the setting lives.

…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.
@niksedk

niksedk commented Jun 14, 2026

Copy link
Copy Markdown
Member

New language string will have to wait for 5.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants