render: OSD: center text vertically

Rewrite render_osd(), and instead of passing in an y-offset, let
render_osd() itself center the text inside the OSD buffer.

This is done using the same baseline calculation term_font_baseline()
does, except we use the buffer height instead of the line height.

Note that most OSDs are sized based on the line height...

Closes #1430
This commit is contained in:
Daniel Eklöf 2023-07-31 16:29:08 +02:00
parent e567250449
commit a3d54614c7
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 20 additions and 9 deletions

View file

@ -53,6 +53,10 @@
### Fixed
* `-f,--font` command line option not affecting `csd.font` (if unset).
* Vertical alignment in URL jump labels, and the scrollback position
indicator. The fix in 1.15.2 was incorrect, and was reverted in the
last minute. But we forgot to remove the entry from the changelog
([#1430][1430]).
### Security