Skip to content

Commit

Permalink
osd_libass: update the OSD bar's dent and border size
Browse files Browse the repository at this point in the history
Make the OSD bar markers bigger so we can default to a smaller,
better-looking border size, without sacrificing markers' visibility.
  • Loading branch information
guidocella authored and Dudemanguy committed Feb 26, 2024
1 parent 1a194e1 commit 09f6f28
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4330,7 +4330,7 @@ OSD
Size of the border of the OSD bar in scaled pixels (see ``--sub-font-size``
for details).

Default: 1.2.
Default: 0.5.

``--osd-back-color=<color>``
See ``--sub-color``. Color used for OSD text background.
Expand Down
2 changes: 1 addition & 1 deletion options/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ const struct m_sub_options mp_osd_render_sub_opts = {
.osd_bar_align_y = 0.5,
.osd_bar_w = 75.0,
.osd_bar_h = 3.125,
.osd_bar_border_size = 1.2,
.osd_bar_border_size = 0.5,
.osd_scale = 1,
.osd_scale_by_window = true,
},
Expand Down
2 changes: 1 addition & 1 deletion sub/osd_libass.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ static void update_progbar(struct osd_state *osd, struct osd_object *obj)
// chapter marks
for (int n = 0; n < obj->progbar_state.num_stops; n++) {
float s = obj->progbar_state.stops[n] * width;
float dent = border * 1.3;
float dent = MPMAX(border * 1.3, 1.6);

if (s > dent && s < width - dent) {
ass_draw_move_to(d, s + dent, 0);
Expand Down

0 comments on commit 09f6f28

Please sign in to comment.