summaryrefslogtreecommitdiffstats
path: root/src/hci
diff options
context:
space:
mode:
authorMichael Brown2013-12-06 17:50:43 +0100
committerMichael Brown2013-12-06 17:51:10 +0100
commit0344dc00949cd1bbf8484bf0f272cff140fa3e78 (patch)
treefd4209c6f450c8182c836a41777a52706c27faf2 /src/hci
parent[settings] Adapt user interface to fit display size (diff)
downloadipxe-0344dc00949cd1bbf8484bf0f272cff140fa3e78.tar.gz
ipxe-0344dc00949cd1bbf8484bf0f272cff140fa3e78.tar.xz
ipxe-0344dc00949cd1bbf8484bf0f272cff140fa3e78.zip
[login] Adapt user interface to fit display size
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r--src/hci/tui/login_ui.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/hci/tui/login_ui.c b/src/hci/tui/login_ui.c
index 52ab0e36..4bf0ad8f 100644
--- a/src/hci/tui/login_ui.c
+++ b/src/hci/tui/login_ui.c
@@ -40,13 +40,13 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define CPAIR_EDIT 2
/* Screen layout */
-#define USERNAME_LABEL_ROW 8
-#define USERNAME_ROW 10
-#define PASSWORD_LABEL_ROW 14
-#define PASSWORD_ROW 16
-#define LABEL_COL 36
-#define EDITBOX_COL 30
-#define EDITBOX_WIDTH 20
+#define USERNAME_LABEL_ROW ( ( LINES / 2U ) - 4U )
+#define USERNAME_ROW ( ( LINES / 2U ) - 2U )
+#define PASSWORD_LABEL_ROW ( ( LINES / 2U ) + 2U )
+#define PASSWORD_ROW ( ( LINES / 2U ) + 4U )
+#define LABEL_COL ( ( COLS / 2U ) - 4U )
+#define EDITBOX_COL ( ( COLS / 2U ) - 10U )
+#define EDITBOX_WIDTH 20U
int login_ui ( void ) {
char username[64];