mirror of https://github.com/mpv-player/mpv
osd_libass: disable --osd-back-color for the progress bar
This breaks the rendering in various ways, so first workaround is to simply disable the opaque box for the bar. Next commit will add an artificial background box.
This commit is contained in:
parent
6193f723b0
commit
c7cdd38ac9
|
@ -367,6 +367,14 @@ static void get_osd_bar_box(struct osd_state *osd, struct osd_object *obj,
|
|||
|
||||
mp_ass_set_style(style, track->PlayResY, opts->osd_style);
|
||||
|
||||
if (osd->opts->osd_style->back_color.a) {
|
||||
// override the default osd opaque-box into plain outline. Otherwise
|
||||
// the opaque box is not aligned with the bar (even without shadow),
|
||||
// and each bar ass event gets its own opaque box - breaking the bar.
|
||||
style->BackColour = MP_ASS_COLOR(opts->osd_style->shadow_color);
|
||||
style->BorderStyle = 1; // outline
|
||||
}
|
||||
|
||||
*o_w = track->PlayResX * (opts->osd_bar_w / 100.0);
|
||||
*o_h = track->PlayResY * (opts->osd_bar_h / 100.0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue