Skip to content

Commit 0f67003

Browse files
committed
FIX: fix thumbnail border clipping through text weird
1 parent dc6c7fe commit 0f67003

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

scripts/modernx.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ local user_opts = {
207207
seek_handle_size = 0.8, -- size ratio of the seekbar handle (range: 0 ~ 1)
208208
progress_bar_height = 16, -- height of the progress bar
209209
seek_range = true, -- show seek range overlay
210-
seek_range_alpha = 150, -- transparency of the seek range
210+
seek_range_alpha = 175, -- transparency of the seek range
211211
seekbar_keyframes = false, -- use keyframes when dragging the seekbar
212212

213213
automatic_keyframe_mode = true, -- automatically set keyframes for the seekbar based on video length
@@ -224,7 +224,8 @@ local user_opts = {
224224

225225
-- sponsorblock features need https://github.com/zydezu/mpvconfig/blob/main/scripts/sponsorblock.lua to work!
226226
show_sponsorblock_segments = true, -- show sponsorblock segments on the progress bar
227-
add_sponsorblock_chapters = true, -- add sponsorblock chapters to the chapter list
227+
add_sponsorblock_chapters = false, -- add sponsorblock chapters to the chapter list
228+
sponsorblock_seek_range_alpha = 75, -- transparency of sponsorblock segments
228229
sponsor_types = { -- what categories to show in the progress bar
229230
"sponsor", -- all categories:
230231
"intro", -- sponsor, intro, outro,
@@ -1070,7 +1071,7 @@ local function draw_sponsorblock_ranges(element, elem_ass, xp, rh)
10701071
local function set_draw_color(color, value, slider_lo, elem_geo)
10711072
elem_ass:draw_stop()
10721073
elem_ass:merge(element.style_ass)
1073-
ass_append_alpha(elem_ass, element.layout.alpha, 50)
1074+
ass_append_alpha(elem_ass, element.layout.alpha, user_opts.sponsorblock_seek_range_alpha)
10741075
elem_ass:append("{\\1cH&" .. osc_color_convert(color) .. "&}")
10751076
elem_ass:merge(element.static_ass)
10761077

@@ -2579,6 +2580,7 @@ local function layouts()
25792580
lo.slider.gap = 7
25802581
lo.slider.tooltip_style = osc_styles.tooltip
25812582
lo.slider.tooltip_an = 2
2583+
lo.layer = 100
25822584

25832585
if (user_opts.persistent_progress_default or user_opts.persistent_progress_toggle) then
25842586
lo = add_layout('persistentseekbar')
@@ -2605,7 +2607,7 @@ local function layouts()
26052607
local outeroffset = (chapter_skip_buttons and 0 or 100) + (jump_buttons and 0 or 100)
26062608

26072609
-- Title
2608-
geo = {x = 25, y = refY - 122 + (((state.localDescription ~= nil or state.is_URL) and user_opts.show_description) and -20 or 0), an = 1, w = osc_geo.w - 50, h = 35}
2610+
geo = {x = 25, y = refY - 117 + (((state.localDescription ~= nil or state.is_URL) and user_opts.show_description) and -20 or 0), an = 1, w = osc_geo.w - 50, h = 35}
26092611
lo = add_layout("title")
26102612
lo.geometry = geo
26112613
lo.style = string.format("%s{\\clip(0,%f,%f,%f)}", osc_styles.title,
@@ -2615,7 +2617,7 @@ local function layouts()
26152617

26162618
-- Description
26172619
if (state.localDescription ~= nil or state.is_URL) and user_opts.show_description then
2618-
geo = {x = 25, y = refY - 122, an = 1, w = osc_geo.w - 50, h = 19}
2620+
geo = {x = 25, y = refY - 117, an = 1, w = osc_geo.w - 50, h = 19}
26192621
lo = add_layout("description")
26202622
lo.geometry = geo
26212623

0 commit comments

Comments
 (0)