Tweak volume value position and rendering
This commit is contained in:
28
uosc.lua
28
uosc.lua
@@ -1486,18 +1486,22 @@ function render_volume(this)
|
||||
ass:draw_stop()
|
||||
|
||||
-- Current volume value
|
||||
ass:new_event()
|
||||
ass:append('{\\blur0\\bord0\\shad0\\1c&H'..options.color_foreground_text..'\\fn'..config.font..'\\fs'..slider.font_size..'\\clip('..fpath.scale..', '..fpath.text..')')
|
||||
ass:append(ass_opacity(math.min(options.volume_opacity + 0.1, 1), opacity))
|
||||
ass:pos(slider.ax + (slider.width / 2), bay + slider.spacing)
|
||||
ass:an(8)
|
||||
ass:append(state.volume)
|
||||
ass:new_event()
|
||||
ass:append('{\\blur0\\bord0\\shad1\\1c&H'..options.color_background_text..'\\4c&H'..options.color_background..'\\fn'..config.font..'\\fs'..slider.font_size..'\\iclip('..fpath.scale..', '..fpath.text..')')
|
||||
ass:append(ass_opacity(math.min(options.volume_opacity + 0.1, 1), opacity))
|
||||
ass:pos(slider.ax + (slider.width / 2), bay + slider.spacing)
|
||||
ass:an(8)
|
||||
ass:append(state.volume)
|
||||
if fay < slider.by - slider.spacing then
|
||||
ass:new_event()
|
||||
ass:append('{\\blur0\\bord0\\shad0\\1c&H'..options.color_foreground_text..'\\fn'..config.font..'\\fs'..slider.font_size..'\\clip('..fpath.scale..', '..fpath.text..')')
|
||||
ass:append(ass_opacity(math.min(options.volume_opacity + 0.1, 1), opacity))
|
||||
ass:pos(slider.ax + (slider.width / 2), slider.by - slider.spacing)
|
||||
ass:an(2)
|
||||
ass:append(state.volume)
|
||||
end
|
||||
if fay > slider.by - slider.spacing - slider.font_size then
|
||||
ass:new_event()
|
||||
ass:append('{\\blur0\\bord0\\shad1\\1c&H'..options.color_background_text..'\\4c&H'..options.color_background..'\\fn'..config.font..'\\fs'..slider.font_size..'\\iclip('..fpath.scale..', '..fpath.text..')')
|
||||
ass:append(ass_opacity(math.min(options.volume_opacity + 0.1, 1), opacity))
|
||||
ass:pos(slider.ax + (slider.width / 2), slider.by - slider.spacing)
|
||||
ass:an(2)
|
||||
ass:append(state.volume)
|
||||
end
|
||||
|
||||
-- Mute button
|
||||
local mute = elements.volume_mute
|
||||
|
Reference in New Issue
Block a user