fix(chrono,timer): state text position

This commit is contained in:
Pihkaal
2024-03-23 03:09:48 +01:00
parent 02ff709718
commit f929b53ae6
2 changed files with 16 additions and 26 deletions

View File

@@ -195,13 +195,10 @@ fn render_frame(
// Display pause state
if chronometer.is_paused() {
let text = "[PAUSE]";
let x = width / 2 - (text.len() as i16) / 2;
rendering::draw_text(
text,
x,
y - symbols::SYMBOL_HEIGHT as i16 - symbols::SYMBOL_HEIGHT as i16 / 2,
color,
)?;
let x = width / 2 - (text.len() as i16) / 2 - 1;
let y = y - symbols::SYMBOL_HEIGHT as i16 + symbols::SYMBOL_HEIGHT as i16 / 2 + 1;
rendering::draw_text(text, x, y, color)?;
}
return Ok(());