feat: added border_radius option

closes #377
This commit is contained in:
tomasklaen
2023-10-06 23:24:20 +02:00
parent d2febcbd47
commit a4ac44a7dc
2 changed files with 4 additions and 1 deletions

View File

@@ -156,6 +156,8 @@ scale_fullscreen=1.3
font_scale=1
# Border of text and icons when drawn directly on top of video
text_border=1.2
# Border radius of buttons, menus, and all other rectangles
border_radius=2
# Use a faster estimation method instead of accurate measurement
# setting this to `no` might have a noticeable impact on performance, especially in large menus.
text_width_estimation=yes

View File

@@ -72,6 +72,7 @@ defaults = {
scale_fullscreen = 1.3,
font_scale = 1,
text_border = 1.2,
border_radius = 2,
text_width_estimation = true,
pause_on_click_shorter_than = 0, -- deprecated by below
click_threshold = 0,
@@ -452,7 +453,7 @@ require('lib/menus')
function update_display_dimensions()
state.scale = (state.hidpi_scale or 1) * (state.fullormaxed and options.scale_fullscreen or options.scale)
state.radius = round(2 * state.scale)
state.radius = round(options.border_radius * state.scale)
local real_width, real_height = mp.get_osd_size()
if real_width <= 0 then return end
display.width, display.height = real_width, real_height