fix(overlay): show all secondary subtitle lines

- Remove the secondary subtitle height and overflow clipping
- Update coverage to allow long subtitle stacks
This commit is contained in:
2026-08-22 23:43:32 -07:00
parent 03ea903927
commit 7486ec79ac
3 changed files with 7 additions and 7 deletions
@@ -0,0 +1,4 @@
type: fixed
area: overlay
- Secondary subtitle overlays now show every rendered line instead of clipping text after roughly four lines.
-4
View File
@@ -1928,10 +1928,6 @@ body.layer-modal #overlay {
text-align: center;
font-size: 24px;
line-height: 1.5;
/* Backstop: pathological tracks (karaoke typesetting, sign spam) must never grow
the hover-pause band beyond a top strip. ~4 lines at line-height 1.5. */
max-height: 6em;
overflow: hidden;
color: #ffffff;
-webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.7);
paint-order: stroke fill;
+3 -3
View File
@@ -1490,13 +1490,13 @@ test('prepareSecondarySubtitleLines strips ASS override tags and handles empty i
assert.deepEqual(prepareSecondarySubtitleLines('{\\an8}'), []);
});
test('secondary subtitle root CSS caps height so hover-pause band stays a top strip', () => {
test('secondary subtitle root CSS does not clip long subtitle stacks', () => {
const srcCssPath = path.join(process.cwd(), 'src', 'renderer', 'style.css');
const cssText = fs.readFileSync(srcCssPath, 'utf-8');
const secondaryRootBlock = extractClassBlock(cssText, '#secondarySubRoot');
assert.match(secondaryRootBlock, /max-height:\s*6em;/);
assert.match(secondaryRootBlock, /overflow:\s*hidden;/);
assert.doesNotMatch(secondaryRootBlock, /max-height\s*:/);
assert.doesNotMatch(secondaryRootBlock, /overflow\s*:\s*hidden/);
});
test('applySubtitleStyle sets known-word maturity color variables', () => {