From 3776a285013fc42ba733d7e9b0c1a1660c2ba05a Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 29 Oct 2015 18:04:18 -0400 Subject: _tui_box(): Fix coordinate offsets Rows and columns are counted from 1. --- diff --git a/src/ui/tui.sh b/src/ui/tui.sh index 078e3e4..1bc16f4 100644 --- a/src/ui/tui.sh +++ b/src/ui/tui.sh @@ -46,8 +46,8 @@ _tui_box() # Clear the screen and set the cursor position to center the box. term_attr_reset term_clear - y=$(expr \( $(term_lines) - ${h} \) / 2) - x=$(expr \( $(term_columns) - ${w} \) / 2) + y=$(expr \( $(term_lines) - ${h} \) / 2 + 1) + x=$(expr \( $(term_columns) - ${w} \) / 2 + 1) term_cursor_position ${y} ${x} # Build the line. -- cgit v0.9.1