Adjust board vertical offset and focus

This commit is contained in:
2026-04-08 14:51:04 +02:00
parent e4682f1c52
commit 247f5c143b
+5 -4
View File
@@ -34,12 +34,13 @@ impl BoardState {
let v_max_offset: usize = Self::max_offset(map_height, rows);
let h_max_offset: usize = Self::max_offset(map_width, cols);
let vertical_offset: Offset =
Offset::new(Some((map_height - rows as usize) / 2), Some(v_max_offset));
let vertical_offset: Offset = Offset::new(
Some((map_height - rows as usize) / 2 + 1),
Some(v_max_offset),
);
let horizontal_offset: Offset = Offset::new(None, Some(h_max_offset));
let focused_cell: FocusedCell =
FocusedCell::new((map_height / 2) - 1, 2, map_height, map_width);
let focused_cell: FocusedCell = FocusedCell::new(map_height / 2, 2, map_height, map_width);
let mut cells: Vec<Vec<CellWidget>> = Vec::new();