aboutsummaryrefslogtreecommitdiffstats
path: root/common/pango.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-07 18:42:43 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-08 16:25:07 +1000
commit9226aad58cca4dd5a408f46c4ae27f339e415b7d (patch)
treea5f435723c13cf913a83d260f5726efc4c6f5a72 /common/pango.c
parentMerge pull request #2603 from emersion/fix-dnd (diff)
downloadsway-9226aad58cca4dd5a408f46c4ae27f339e415b7d.tar.gz
sway-9226aad58cca4dd5a408f46c4ae27f339e415b7d.tar.zst
sway-9226aad58cca4dd5a408f46c4ae27f339e415b7d.zip
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 'common/pango.c')
0 files changed, 0 insertions, 0 deletions