Skip to content

Fix macOS subtitle outline toggle and add outline width - #444

Open
hezhamen wants to merge 1 commit into
NuvioMedia:Devfrom
hezhamen:fix/macos-subtitle-outline
Open

hezhamen wants to merge 1 commit into
NuvioMedia:Devfrom
hezhamen:fix/macos-subtitle-outline

Conversation

@hezhamen

@hezhamen hezhamen commented Aug 22, 2026

Copy link
Copy Markdown

Summary

macOS subtitle outline On/Off did not change the rendered subs. Custom styling only set sub-outline-size and an ASS Bold= override, so embedded Outline/Shadow stayed. This PR makes outline apply, and adds a width control.

What changed:

  • macOS player_bridge.mm: when custom styling is on, also set sub-border-size, sub-border-color, sub-shadow-offset=0, and ASS style overrides Bold=…,Outline=…,Shadow=0. Outline off now sends size 0 and Outline=0.
  • Desktop player Style panel: outline toggle still On/Off; width stepper (1–8) and color swatches hide when outline is off.
  • Playback settings: outline width slider when outline is enabled.
  • Shared settings/model: clamp stored outlineWidth to 1–8; persist was already there, it just had no UI.
  • Player controls JSON/JS: send outlineWidth / subtitleOutlineWidthDelta.

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Primary fix is the macOS outline toggle not applying. Outline width is a small control on the same setting (outlineWidth already existed in storage).

Why

User-visible bug: Style → Outline On/Off did not add or remove the subtitle border on macOS.

Expected: Off removes the border; On draws it. Width should be adjustable.

Desktop scope

  • macOS: native mpv apply path (player_bridge.mm) — this is the actual fix.
  • Desktop shared: player overlay HTML/CSS/JS and NativePlayerController JSON.
  • Common: PlayerSettingsRepository clamp, playback settings slider, player event subtitleOutlineWidthDelta, English strings.

Windows native bridge is unchanged (outline apply there still the old path). Android already used outlineWidth in libmpv; the settings slider is now visible on all platforms because the setting is shared.

Issue or approval

No linked issue: fix came from in-app testing of the outline toggle, not a GitHub issue. Happy to file one if maintainers want it linked.

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

UI: outline width stepper in the player Style panel and a matching settings slider. No layout/theme redesign.

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is scoped to the desktop app, desktop packaging, desktop documentation, or shared code required for desktop behavior.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

No GitHub issue yet (see above). Screenshots/video not attached in this description.

Scope boundaries

  • Did not change Windows player_bridge.cpp.
  • Did not change iOS/Android native apply beyond shared settings UI.
  • Custom styling Off (libass) still uses embedded ASS styles; outline controls stay ignored there.
  • No dependency, packaging, or architecture changes.

Testing

Manual intent (macOS desktop, custom styling On):

  • Outline Off — border gone
  • Outline On — border back
  • Width 1–8 in player and Settings → Playback; persists after reopen
  • Bold + outline together
  • Custom styling Off still looks like embedded ASS
  • Background color + outline still readable

Screenshots / Video

Not attached. UI addition is the outline width stepper/slider next to the existing outline toggle.

Breaking changes

None for config/schema. Possible visual diffs only with custom styling On:

  • Shadow=0 can flatten ASS drop shadows.
  • Forced Outline= can change thickness vs the file’s embedded outline.
  • Stored outline width outside 1–8 is clamped.

Linked issues

No linked issue — outline toggle was broken on macOS in the player Style panel; width control uses the existing outlineWidth setting.

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.

1 participant