@@ -50,6 +50,7 @@ local user_opts = {
5050 boxvideo = false , -- apply osc_param.video_margins to video
5151 dynamic_margins = false , -- update margins dynamically with OSC visibility
5252 sub_margins = true , -- adjust sub-margin-y to not overlap with OSC
53+ osd_margins = true , -- adjust osd-margin-y to not overlap with OSC
5354 windowcontrols = " auto" , -- whether to show window controls
5455 windowcontrols_alignment = " right" , -- which side to show window controls on
5556 windowcontrols_title = " ${media-title}" , -- same as title but for windowcontrols
@@ -186,6 +187,7 @@ local margins_opts = {
186187 {" b" , " video-margin-ratio-bottom" },
187188}
188189local sub_margin_opt = " file-local-options/sub-margin-y"
190+ local osd_margin_opt = " file-local-options/osd-margin-y"
189191
190192local tick_delay = 1 / 60
191193local audio_track_count = 0
@@ -563,6 +565,7 @@ local function reset_margins()
563565 state .using_video_margins = false
564566 end
565567 set_margin_offset (sub_margin_opt , 0 )
568+ set_margin_offset (osd_margin_opt , 0 )
566569end
567570
568571local function update_margins ()
@@ -617,6 +620,7 @@ local function update_margins()
617620 return margin * osc_param .playresy
618621 end
619622 set_margin_offset (" sub-margin-y" , get_margin (" sub" ))
623+ set_margin_offset (" osd-margin-y" , get_margin (" osd" ))
620624
621625 mp .set_property_native (" user-data/osc/margins" , margins )
622626end
0 commit comments