You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code previously supported either having no border on a particular side, or having a border of 1 cell.
But now border can be of arbitrary width/height, and also a particular side can have border of width or height 0.
Somewhere inside src/widget_rendering.cr#_render there is a part titled "Draw borders".
Its code works on the assumption that if there is a border, its width/height is 1 cell. Having a border of 0c makes the border not show up, but it does overwrite the text in the line.
The part that the code reaches is near the end of the function:
if (border.bottom == 0) && x != xi && x != xl - 1
ch = ' '
if cell != {default_attr, ch}
lines[y][x].attr = default_attr
lines[y][x].char = (ch || ' ')
lines[y].dirty = true
end
next
end
This code should be adjusted so that a border of 0 on a particular side behaves identically as the no* setting on that side (e.g. like notop or noleft).
The text was updated successfully, but these errors were encountered:
docelic
changed the title
Fix content drawing when border width or height == 0
Fix border drawing when border width or height == 0
Apr 4, 2023
The code previously supported either having no border on a particular side, or having a border of 1 cell.
But now border can be of arbitrary width/height, and also a particular side can have border of width or height 0.
Somewhere inside
src/widget_rendering.cr#_render
there is a part titled "Draw borders".Its code works on the assumption that if there is a border, its width/height is 1 cell. Having a border of 0c makes the border not show up, but it does overwrite the text in the line.
The part that the code reaches is near the end of the function:
This code should be adjusted so that a border of
0
on a particular side behaves identically as theno*
setting on that side (e.g. likenotop
ornoleft
).The text was updated successfully, but these errors were encountered: