center first line of comments vertically in the grid
This commit is contained in:
parent
c4378c85f5
commit
f5b5356139
1 changed files with 1 additions and 0 deletions
|
@ -79,6 +79,7 @@ impl Board {
|
|||
for comment in &self.comments {
|
||||
let x = comment.x * tile_size + offset.x as i32;
|
||||
let y = comment.y * tile_size + offset.y as i32;
|
||||
let y = y + (tile_size - font_size) / 2; // center vertically in the grid row
|
||||
for (i, line) in comment.text.lines().enumerate() {
|
||||
let y = y + line_space * i as i32;
|
||||
d.draw_text(line, x, y, font_size, Color::ORANGE);
|
||||
|
|
Loading…
Add table
Reference in a new issue