Pārlūkot izejas kodu

[login] Adapt user interface to fit display size

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 gadus atpakaļ
vecāks
revīzija
0344dc0094
1 mainītis faili ar 7 papildinājumiem un 7 dzēšanām
  1. 7
    7
      src/hci/tui/login_ui.c

+ 7
- 7
src/hci/tui/login_ui.c Parādīt failu

@@ -40,13 +40,13 @@ FILE_LICENCE ( GPL2_OR_LATER );
40 40
 #define CPAIR_EDIT		2
41 41
 
42 42
 /* Screen layout */
43
-#define USERNAME_LABEL_ROW	8
44
-#define USERNAME_ROW		10
45
-#define PASSWORD_LABEL_ROW	14
46
-#define PASSWORD_ROW		16
47
-#define LABEL_COL		36
48
-#define EDITBOX_COL		30
49
-#define EDITBOX_WIDTH		20
43
+#define USERNAME_LABEL_ROW	( ( LINES / 2U ) - 4U )
44
+#define USERNAME_ROW		( ( LINES / 2U ) - 2U )
45
+#define PASSWORD_LABEL_ROW	( ( LINES / 2U ) + 2U )
46
+#define PASSWORD_ROW		( ( LINES / 2U ) + 4U )
47
+#define LABEL_COL		( ( COLS / 2U ) - 4U )
48
+#define EDITBOX_COL		( ( COLS / 2U ) - 10U )
49
+#define EDITBOX_WIDTH		20U
50 50
 
51 51
 int login_ui ( void ) {
52 52
 	char username[64];

Notiek ielāde…
Atcelt
Saglabāt