From ee000f213375f7284d292b83161195b4eb081701 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Thu, 26 Jan 2017 22:05:59 +0000 Subject: osc: bottom/topbar: clip title instead of stretching --- player/lua/osc.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'player') diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 6c30a84fc7..13ce3ff418 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -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 -- cgit v1.2.3