mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-23 12:15:28 -07:00
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:
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: overlay
|
||||||
|
|
||||||
|
- Secondary subtitle overlays now show every rendered line instead of clipping text after roughly four lines.
|
||||||
@@ -1928,10 +1928,6 @@ body.layer-modal #overlay {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 1.5;
|
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;
|
color: #ffffff;
|
||||||
-webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.7);
|
-webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.7);
|
||||||
paint-order: stroke fill;
|
paint-order: stroke fill;
|
||||||
|
|||||||
@@ -1490,13 +1490,13 @@ test('prepareSecondarySubtitleLines strips ASS override tags and handles empty i
|
|||||||
assert.deepEqual(prepareSecondarySubtitleLines('{\\an8}'), []);
|
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 srcCssPath = path.join(process.cwd(), 'src', 'renderer', 'style.css');
|
||||||
const cssText = fs.readFileSync(srcCssPath, 'utf-8');
|
const cssText = fs.readFileSync(srcCssPath, 'utf-8');
|
||||||
|
|
||||||
const secondaryRootBlock = extractClassBlock(cssText, '#secondarySubRoot');
|
const secondaryRootBlock = extractClassBlock(cssText, '#secondarySubRoot');
|
||||||
assert.match(secondaryRootBlock, /max-height:\s*6em;/);
|
assert.doesNotMatch(secondaryRootBlock, /max-height\s*:/);
|
||||||
assert.match(secondaryRootBlock, /overflow:\s*hidden;/);
|
assert.doesNotMatch(secondaryRootBlock, /overflow\s*:\s*hidden/);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('applySubtitleStyle sets known-word maturity color variables', () => {
|
test('applySubtitleStyle sets known-word maturity color variables', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user