aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/lua
diff options
context:
space:
mode:
authorGravatar Ricardo Constantino <wiiaboo@gmail.com>2017-01-26 22:05:59 +0000
committerGravatar Ricardo Constantino <wiiaboo@gmail.com>2017-01-31 18:54:40 +0000
commitee000f213375f7284d292b83161195b4eb081701 (patch)
treea92b5c9a48f97a8cea12d9280b3c23d5e07816a2 /player/lua
parentccf2b302cf314575fa4184e5ae19532c2444159e (diff)
osc: bottom/topbar: clip title instead of stretching
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/osc.lua10
1 files changed, 6 insertions, 4 deletions
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