diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 7a0da03..fba6e88 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -43,6 +43,7 @@ local user_opts = { tooltipborder = 1, -- border of tooltip in bottom/topbar timetotal = false, -- display total time instead of remaining time? timems = false, -- display timecodes with milliseconds? + tcspace = 100, -- timecode spacing (compensate font size estimation) visibility = "auto", -- only used at init to set visibility_mode(...) boxmaxchars = 80, -- title crop threshold for box layout boxvideo = false, -- apply osc_param.video_margins to video @@ -1480,6 +1481,11 @@ function bar_layout(direction) local padY = 3 local buttonW = 27 local tcW = (state.tc_ms) and 170 or 110 + if user_opts.tcspace >= 50 and user_opts.tcspace <= 200 then + -- adjust our hardcoded font size estimation + tcW = tcW * user_opts.tcspace / 100 + end + local tsW = 90 local minW = (buttonW + padX)*5 + (tcW + padX)*4 + (tsW + padX)*2