Skip to content

Commit

Permalink
Fix potential misalignment of text menu
Browse files Browse the repository at this point in the history
Any style overrides from the mpv.conf shouldn't matter because of the
\rDefault, but apparently it's still possible to break alignment somehow,
so simply set an alignment to what we need.

ref. #40
  • Loading branch information
christoph-heinrich committed Jul 4, 2024
1 parent 96e449d commit ab40a0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quality-menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ local function text_menu_open(formats, active_format, menu_type)
local clip_top = math.floor(margin_top * height + 0.5)
local clip_bottom = math.floor((1 - margin_bottom) * height + 0.5)
local clipping_coordinates = '0,' .. clip_top .. ',' .. width .. ',' .. clip_bottom
ass:append('{\\rDefault\\q2\\clip(' .. clipping_coordinates .. ')}' .. opts.style_ass_tags)
ass:append('{\\rDefault\\an7\\q2\\clip(' .. clipping_coordinates .. ')}' .. opts.style_ass_tags)

if #formats > 0 then
for i, format in ipairs(formats) do
Expand Down

0 comments on commit ab40a0d

Please sign in to comment.