r305 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat May 26 16:29:20 EDT 2007


Author: icculus
Date: 2007-05-26 16:29:19 -0400 (Sat, 26 May 2007)
New Revision: 305

Modified:
   trunk/gui_ncurses.c
Log:
ncurses UI: Draw an hline below the installer title. This matches what the
 Linux kernel's "make menuconfig" does, and it looks pretty good.


Modified: trunk/gui_ncurses.c
===================================================================
--- trunk/gui_ncurses.c	2007-05-26 20:23:04 UTC (rev 304)
+++ trunk/gui_ncurses.c	2007-05-26 20:29:19 UTC (rev 305)
@@ -210,8 +210,11 @@
     wclear(win);
     if (title != NULL)
     {
+        int w, h;
+        getmaxyx(win, h, w);
         wattron(win, COLOR_PAIR(MOJOCOLOR_BACKGROUND) | A_BOLD);
         mvwaddstr(win, 0, 0, title);
+        mvwhline(win, 1, 1, ACS_HLINE, w-2);
         wattroff(win, COLOR_PAIR(MOJOCOLOR_BACKGROUND) | A_BOLD);
     } // if
 } // drawBackground
@@ -277,8 +280,8 @@
     if (bcount > 0)
         h += 2;
 
-    if (h > scrh)
-        h = scrh;
+    if (h > scrh-2)
+        h = scrh-2;
 
     x = (scrw - w) / 2;
     y = ((scrh - h) / 2) + 1;




More information about the mojosetup-commits mailing list