-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix subtitle margin #40
base: main
Are you sure you want to change the base?
Conversation
request_tick() | ||
end | ||
|
||
function subtitle_fix() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be better to adjust subtitle positioning based on the resolution of the window, else subtitles are obstructed.
function adjustSubtitles()
if user_opts.raisesubswithosc and state.osc_visible == true and (state.fullscreen == false or user_opts.showfullscreen) then
local w, h = mp.get_osd_size()
if h > 0 then
mp.commandv('set', 'sub-pos', math.floor((osc_param.playresy - 175)/osc_param.playresy*100)) -- percentage
end
else
mp.commandv('set', 'sub-pos', 100)
end
end
This is my solution to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't exactly understand your code, but I replaced the function you wrote with my own function, but it didn't work. Did I make a mistake somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I'm sorry! I may have changed the subroutine name in my code from subtitle_fix() to adjustSubtitles(), try that!
I didn't exactly understand your code, but I replaced the function you wrote with my own function, but it didn't work. Did I make a mistake somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this. I replaced the code inside the function you wrote with my own code and it didn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh im sorry ... it's the user_opts.raisesubswithosc
... remove that (and the and
) and maybe it'll work? Sorry my own fork is slightly different in the implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh im sorry ... it's the
user_opts.raisesubswithosc
... remove that (and theand
) and maybe it'll work? Sorry my own fork is slightly different in the implementation.
No, that didn't work either.
Set margin from the bottom when OSC is visible.