File tree 3 files changed +16
-6
lines changed
3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ Create `modernz.conf` in your mpv script-opts directory:
30
30
| ----------------------- | ----- | ---------------------------------------------------------------------- |
31
31
| hidetimeout | 2000 | time (in ms) before OSC hides if no mouse movement |
32
32
| seek_resets_hidetimeout | yes | if seeking should reset the hidetimeout |
33
- | fadeduration | 250 | fade-out duration (in ms), set to ` "0" ` for no fade |
33
+ | fadeduration | 200 | fade-out duration (in ms), set to ` "0" ` for no fade |
34
+ | fadein | no | whether to enable fade-in effect |
34
35
| minmousemove | 0 | minimum mouse movement (in pixels) required to show OSC |
35
36
| bottomhover | yes | show OSC only when hovering at the bottom |
36
37
| bottomhover_zone | 130 | height of hover zone for bottomhover (in pixels) |
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ hidetimeout=1500
25
25
# if seeking should reset the hidetimeout
26
26
seek_resets_hidetimeout=yes
27
27
# fade-out duration (in ms), set to 0 for no fade
28
- fadeduration=250
28
+ fadeduration=200
29
+ # whether to enable fade-in effect
30
+ fadein=no
29
31
# minimum mouse movement (in pixels) required to show OSC
30
32
minmousemove=0
31
33
# show OSC only when hovering at the bottom
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ local user_opts = {
33
33
-- OSC behaviour and scaling
34
34
hidetimeout = 1500 , -- time (in ms) before OSC hides if no mouse movement
35
35
seek_resets_hidetimeout = true , -- if seeking should reset the hidetimeout
36
- fadeduration = 250 , -- fade-out duration (in ms), set to 0 for no fade
36
+ fadeduration = 200 , -- fade-out duration (in ms), set to 0 for no fade
37
+ fadein = false , -- whether to enable fade-in effect
37
38
minmousemove = 0 , -- minimum mouse movement (in pixels) required to show OSC
38
39
bottomhover = true , -- show OSC only when hovering at the bottom
39
40
bottomhover_zone = 130 , -- height of hover zone for bottomhover (in pixels)
@@ -2864,9 +2865,15 @@ local function show_osc()
2864
2865
-- remember last time of invocation (mouse move)
2865
2866
state .showtime = mp .get_time ()
2866
2867
2867
- osc_visible (true )
2868
-
2869
- if user_opts .fadeduration > 0 then
2868
+ if user_opts .fadeduration <= 0 then
2869
+ osc_visible (true )
2870
+ elseif user_opts .fadein then
2871
+ if not state .osc_visible then
2872
+ state .anitype = " in"
2873
+ request_tick ()
2874
+ end
2875
+ else
2876
+ osc_visible (true )
2870
2877
state .anitype = nil
2871
2878
end
2872
2879
end
You can’t perform that action at this time.
0 commit comments