diff --git a/docs/USER_OPTS.md b/docs/USER_OPTS.md index 7bc4209..d930358 100644 --- a/docs/USER_OPTS.md +++ b/docs/USER_OPTS.md @@ -108,19 +108,20 @@ Create `modernz.conf` in your mpv script-opts directory: ### UI [behavior] -| Option | Value | Description | -| --------------- | ----- | ---------------------------------------------------------- | -| showonpause | yes | whether to show osc when paused | -| keeponpause | yes | whether to disable the hide timeout on pause | -| bottomhover | yes | if the osc should only display when hovering at the bottom | -| raisesubs | yes | whether to raise subtitles above the osc when it's shown | -| raisesubamount | 175 | how much subtitles rise when the osc is shown | -| thumbnailborder | 2 | the width of the thumbnail border (thumbfast) | -| OSCfadealpha | 150 | alpha of the background box for the OSC | -| boxalpha | 75 | alpha of the window title bar | -| ontopborder | no | If you pin the window, keep window border? | -| loopinpause | yes | activate looping by right clicking pause | -| visibility | auto | only used at init to set visibility_mode(...) | +| Option | Value | Description | +| ---------------- | ----- | ---------------------------------------------------------- | +| showonpause | yes | whether to show osc when paused | +| keeponpause | yes | whether to disable the hide timeout on pause | +| bottomhover | yes | if the osc should only display when hovering at the bottom | +| bottomhover_zone | 160 | height of show/hide zone for bottomhover | +| raisesubs | yes | whether to raise subtitles above the osc when it's shown | +| raisesubamount | 175 | how much subtitles rise when the osc is shown | +| thumbnailborder | 2 | the width of the thumbnail border (thumbfast) | +| OSCfadealpha | 150 | alpha of the background box for the OSC | +| boxalpha | 75 | alpha of the window title bar | +| ontopborder | no | If you pin the window, keep window border? | +| loopinpause | yes | activate looping by right clicking pause | +| visibility | auto | only used at init to set visibility_mode(...) | ### UI [time-based] diff --git a/modernz.lua b/modernz.lua index 78f0b2a..5c1ce61 100644 --- a/modernz.lua +++ b/modernz.lua @@ -99,6 +99,7 @@ local user_opts = { showonpause = true, -- whether to show osc when paused keeponpause = true, -- whether to disable the hide timeout on pause bottomhover = true, -- if the osc should only display when hovering at the bottom + bottomhover_zone = 160, -- height of show/hide zone for bottomhover raisesubs = true, -- whether to raise subtitles above the osc when it's shown raisesubamount = 175, -- how much subtitles rise when the osc is shown thumbnailborder = 2, -- the width of the thumbnail border (thumbfast) @@ -2290,7 +2291,7 @@ local function process_event(source, what) ) ) then if user_opts.bottomhover then -- if enabled, only show osc if mouse is hovering at the bottom of the screen (where the UI elements are) - if mouseY > osc_param.playresy - 160 or (not state.border or state.fullscreen) and mouseY < 40 then -- account for scaling options + if mouseY > osc_param.playresy - (user_opts.bottomhover_zone or 160) or (not state.border or state.fullscreen) and mouseY < 40 then -- account for scaling options show_osc() else hide_osc()