Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/console: default to semitransparent back color #15549

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DOCS/interface-changes/back-color.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
change `--osd-back-color` and `--sub-back-color` defaults to #AF000000
2 changes: 0 additions & 2 deletions etc/builtin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ zimg-scaler=bilinear
zimg-dither=no

[osd-box]
osd-back-color="#AF000000"
osd-border-style=background-box
osd-outline-size=0
osd-shadow-offset=4
Expand All @@ -89,7 +88,6 @@ script-opt=stats-shadow_x_offset=4
script-opt=stats-shadow_y_offset=4

[sub-box]
sub-back-color="#AF000000"
sub-border-style=background-box
sub-outline-size=0
sub-shadow-offset=4
Expand Down
6 changes: 3 additions & 3 deletions player/lua/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ local function update()
local has_shadow = mp.get_property('osd-border-style'):find('box$') == nil
local font = get_font()
local style = '{\\r' ..
(has_shadow and '\\4a&H99&\\4c&H000000&\\xshad0\\yshad1' or '') ..
(has_shadow and '\\xshad0\\yshad1' or '') ..
(font and '\\fn' .. font or '') ..
'\\fs' .. opts.font_size ..
'\\bord' .. opts.border_size .. '\\fsp0' ..
Expand All @@ -563,8 +563,8 @@ local function update()
local cheight = opts.font_size * 8
local cglyph = '{\\rDefault' ..
(mp.get_property_native('focused') == false
and '\\alpha&HFF&' or '\\1a&H44&\\3a&H44&\\4a&H99&') ..
'\\1c&Heeeeee&\\3c&Heeeeee&\\4c&H000000&' ..
and '\\alpha&HFF&' or '\\1a&H44&\\3a&H44&') ..
'\\1c&Heeeeee&\\3c&Heeeeee&' ..
'\\xbord0.5\\ybord0\\xshad0\\yshad1\\p4\\pbo24}' ..
'm 0 0 l 1 0 l 1 ' .. cheight .. ' l 0 ' .. cheight ..
'{\\p0}'
Expand Down
4 changes: 2 additions & 2 deletions sub/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const struct m_sub_options osd_style_conf = {
.font_size = 30,
.color = {255, 255, 255, 255},
.outline_color = {0, 0, 0, 255},
.back_color = {240, 240, 240, 128},
.back_color = {0, 0, 0, 175},
.border_style = 1,
.outline_size = 1.65,
.shadow_offset = 0,
Expand All @@ -104,7 +104,7 @@ const struct m_sub_options sub_style_conf = {
.font_size = 38,
.color = {255, 255, 255, 255},
.outline_color = {0, 0, 0, 255},
.back_color = {240, 240, 240, 128},
.back_color = {0, 0, 0, 175},
.border_style = 1,
.outline_size = 1.65,
.shadow_offset = 0,
Expand Down
Loading