center first line of comments vertically in the grid

This commit is contained in:
Crispy 2025-03-29 12:21:41 +01:00
parent c4378c85f5
commit f5b5356139

View file

@ -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);