summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2023-03-11 11:25:26 +0100
committerDudemanguy <random342@airmail.cc>2023-04-26 16:30:01 +0000
commitc5211dbf4ae38583b4a55ab63c5c07f8547f73b8 (patch)
tree5ef7d88b5863d817010205eef8e04023eebff166
parent4fd0a39fc8aad3fb8d7bb8ed2b2918e1e0e7a53b (diff)
downloadmpv-c5211dbf4ae38583b4a55ab63c5c07f8547f73b8.tar.bz2
mpv-c5211dbf4ae38583b4a55ab63c5c07f8547f73b8.tar.xz
console.lua: add a script-opt for the border size
Because I find the console log easier to read with a thicker border.
-rw-r--r--DOCS/man/console.rst5
-rw-r--r--player/lua/console.lua3
2 files changed, 7 insertions, 1 deletions
diff --git a/DOCS/man/console.rst b/DOCS/man/console.rst
index 3bd88bde11..681b7e5da1 100644
--- a/DOCS/man/console.rst
+++ b/DOCS/man/console.rst
@@ -144,6 +144,11 @@ Configurable Options
Set the font size used for the REPL and the console. This will be
multiplied by "scale".
+``border_size``
+ Default: 1
+
+ Set the font border size used for the REPL and the console.
+
``history_dedup``
Default: true
diff --git a/player/lua/console.lua b/player/lua/console.lua
index 6928cd83b7..616dd53761 100644
--- a/player/lua/console.lua
+++ b/player/lua/console.lua
@@ -27,6 +27,7 @@ local opts = {
-- Set the font size used for the REPL and the console. This will be
-- multiplied by "scale".
font_size = 16,
+ border_size = 1,
-- Remove duplicate entries in history as to only keep the latest one.
history_dedup = true,
}
@@ -144,7 +145,7 @@ function update()
'\\1a&H00&\\3a&H00&\\4a&H99&' ..
'\\1c&Heeeeee&\\3c&H111111&\\4c&H000000&' ..
'\\fn' .. opts.font .. '\\fs' .. opts.font_size ..
- '\\bord1\\xshad0\\yshad1\\fsp0\\q1' ..
+ '\\bord' .. opts.border_size .. '\\xshad0\\yshad1\\fsp0\\q1' ..
'\\clip(' .. clipping_coordinates .. ')}'
-- Create the cursor glyph as an ASS drawing. ASS will draw the cursor
-- inline with the surrounding text, but it sets the advance to the width