mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
osc: bottom/topbar: clip title instead of stretching
This commit is contained in:
parent
ccf2b302cf
commit
ee000f2133
@ -1224,8 +1224,9 @@ layouts["bottombar"] = function()
|
||||
w = t_r - t_l, h = geo.h }
|
||||
lo = add_layout("title")
|
||||
lo.geometry = geo
|
||||
lo.style = osc_styles.vidtitleBar
|
||||
lo.button.maxchars = math.floor(geo.w/7)
|
||||
lo.style = string.format("%s{\\clip(%f,%f,%f,%f)}",
|
||||
osc_styles.vidtitleBar,
|
||||
geo.x, geo.y-geo.h/2, geo.w, geo.y+geo.h/2)
|
||||
|
||||
|
||||
-- Playback control buttons
|
||||
@ -1450,8 +1451,9 @@ layouts["topbar"] = function()
|
||||
w = t_r - t_l, h = geo.h }
|
||||
lo = add_layout("title")
|
||||
lo.geometry = geo
|
||||
lo.style = osc_styles.vidtitleBar
|
||||
lo.button.maxchars = math.floor(geo.w/7)
|
||||
lo.style = string.format("%s{\\clip(%f,%f,%f,%f)}",
|
||||
osc_styles.vidtitleBar,
|
||||
geo.x, geo.y-geo.h/2, geo.w, geo.y+geo.h/2)
|
||||
end
|
||||
|
||||
-- Validate string type user options
|
||||
|
Loading…
Reference in New Issue
Block a user