aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-04-10 11:16:39 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-04-18 18:08:41 +0000
commit8561fdb0047f307e9c2a7a0b64dbc9e6d8d080a5 (patch)
tree6694bb83a4a82ed44df11b5d4d5c2e9a310e3a3e /scripts
parentdoc: 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')
0 files changed, 0 insertions, 0 deletions