1
0
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:
Ricardo Constantino 2017-01-26 22:05:59 +00:00
parent ccf2b302cf
commit ee000f2133
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -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