diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-04-10 11:16:39 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-04-10 11:23:20 +0000 |
| commit | c6848678ad6ceb75d06f59a3dd0284dafc953d09 (patch) | |
| tree | 6694bb83a4a82ed44df11b5d4d5c2e9a310e3a3e /scripts/benchmark.py | |
| parent | doc: foot.ini: re-phrase the box-drawings-uses-font-glyphs section (diff) | |
render: don’t let URL jump label sub-surfaces extend outside window geometry
We have no guarantee that sub-surfaces extending outside the window
geometry are rendered correctly (if at all).
For example, both Sway and River will render the window border on top
of the sub-surface.
Future versions of Sway may clip the sub-surface.
Since jump-labels are positioned slightly above, and to the left of
the URLs first character, having a label on either the top row, or on
the first column, will likely position it outside the window. This is
handled by simply setting x/y to 0 (or, to -margin, since the label
coordinate is later offsetted with the window margins).
Second, if the label is very long, it may extend outside the
window. This is very unusual for labels only showing the key, and not
the URL itself, but could happen in this case too, if e.g. the user
has configured double-width key characters.
This is handled by calculating its maximum width, and then truncating
the label.
Although very unlikely, it is possible for a label to also extend
outside the window’s vertical size. This could happen for very small
font sizes, where the label’s own margins are large, relative to the
font size. This case is currently not handled.
Closes #443
Diffstat (limited to 'scripts/benchmark.py')
0 files changed, 0 insertions, 0 deletions
