-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
console.lua: always draw a background behind items
Draw a background behind selectable items even with outline-and-shadow. This makes sense for a menu because you want it to be readable, select something and move on. It doesn't stay open while watching like OSD messages and subtitles, so it can cover more of the video. In fact this was probably the only menu without a background by default. Also the scrollbar without a background looked weird, and the background shows the new horizontal hit box. --osd-outline-color determines the background color with outline-and-shadow, while --osd-back-color determines the background color with background-box. Some transparency is added because using pure black is not recommended because it causes eye strain; alternatively --osd-outline-color could default to #222222. Drawing the background ourselves also allows making the corners rounded. Free-form text mode keeps using only background-box backgrounds if configured as covering the whole screen while searching stats key bindings would be bad. Searching history also doesn't add a background to not change the layout abruptly. When searching history with background-box, it preserves the alpha component of --osd-back-color.
- Loading branch information
1 parent
7d1d1cf
commit 24cd11d
Showing
4 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add `console-background_alpha` `console-menu_outline_size` `console-menu_outline_color` `console-corner_radius` script-opts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters