From 266cb79f38fd1a5fd448b453dee5971795a145ca Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Tue, 24 Mar 2026 10:34:42 +0100 Subject: [PATCH] osc.lua: make all the height of bar lines clickable There is an area between the 2 lines of bottombar and topbar that is not clickable, e.g. between the menu and play_pause icons. Make it all clickable so it's easier to click buttons. This also allows clicking from the bottom in slimbottombar and from the top in topbottombar. --- player/lua/osc.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/player/lua/osc.lua b/player/lua/osc.lua index dee63f91d6..49d5587ebf 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -1719,7 +1719,6 @@ local function bar_layout(direction, slim) } local padX = 9 - local padY = 3 local buttonW = 27 local tcW = (state.tc_ms) and 170 or 110 if user_opts.tcspace >= 50 and user_opts.tcspace <= 200 then @@ -1761,8 +1760,8 @@ local function bar_layout(direction, slim) osc_param.video_margins.t = osc_geo.h / osc_param.playresy end - local line1 = osc_geo.y - direction * (9 + padY) - local line2 = osc_geo.y - direction * (36 + padY) + local line1 = osc_geo.y - direction * 12 + local line2 = osc_geo.y - direction * 39 osc_param.areas = {} @@ -1795,7 +1794,7 @@ local function bar_layout(direction, slim) -- Menu - geo = { x = osc_geo.x + padX + 4, y = line1, an = 4, w = 18, h = 18 - padY } + geo = { x = osc_geo.x + padX + 4, y = line1, an = 4, w = 18, h = math.abs(line2 - line1) } lo = add_layout("menu") lo.geometry = geo lo.style = osc_styles.topButtonsBar @@ -1858,7 +1857,7 @@ local function bar_layout(direction, slim) -- Playback control buttons geo = { x = osc_geo.x + padX + padwc_l, y = line2, an = 4, - w = buttonW, h = 36 - padY*2} + w = buttonW, h = osc_geo.h - math.abs(line2 - line1)} lo = add_layout("play_pause") lo.geometry = geo lo.style = osc_styles.smallButtonsBar