diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-07 18:42:43 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-08 16:25:07 +1000 |
commit | 9226aad58cca4dd5a408f46c4ae27f339e415b7d (patch) | |
tree | a5f435723c13cf913a83d260f5726efc4c6f5a72 /sway/tree/view.c | |
parent | 030b5bc02455bc936a9a7fedc05c3f9b7c813098 (diff) |
Fix gaps in title textures and vertically center them
There was code that attempted to fill in the gap below the title texture
when the texture isn't tall enough, but this only worked when the output
was positioned at 0,0. The reason is that render_rect expects a box
passed in a hybrid layout-local/output-buffer-local system, and we were
passing purely output-buffer-local. I've added a comment documenting
this.
By the way, we can't use layout-local coordinates for the rectangle box
because in some cases we set the box based on a texture size. Texture
sizes are buffer-local, and we'd have to divide them to bring it back to
layout-local which means losing precision. We could use
output-buffer-local coordinates for the box, but this would require
translating the coordinates from layout-local to output-buffer-local in
many places during rendering.
This patch also vertically centers the text inside the title bar.
Diffstat (limited to 'sway/tree/view.c')
0 files changed, 0 insertions, 0 deletions