@@ -191,7 +191,7 @@ public static Attribute MakeColor (short foreground, short background)
191191 background : MapCursesColor ( background ) ) ;
192192 }
193193
194- public override Attribute MakeColor ( Color fore , Color back )
194+ static Attribute MakeColor ( Color fore , Color back )
195195 {
196196 return MakeColor ( ( short ) MapColor ( fore ) , ( short ) MapColor ( back ) ) ;
197197 }
@@ -663,7 +663,7 @@ void ProcessInput (Action<KeyEvent> keyHandler, Action<KeyEvent> keyDownHandler,
663663
664664 // Special handling for ESC, we want to try to catch ESC+letter to simulate alt-letter as well as Alt-Fkey
665665 if ( wch == 27 ) {
666- Curses . timeout ( 10 ) ;
666+ Curses . timeout ( 200 ) ;
667667
668668 code = Curses . get_wch ( out int wch2 ) ;
669669
@@ -820,7 +820,6 @@ public override void Init (Action terminalResized)
820820 //Console.Out.Flush ();
821821
822822 window = Curses . initscr ( ) ;
823- Curses . set_escdelay ( 10 ) ;
824823 } catch ( Exception e ) {
825824 throw new Exception ( $ "Curses failed to initialize, the exception is: { e . Message } ") ;
826825 }
@@ -890,14 +889,51 @@ public override void Init (Action terminalResized)
890889 //UpArrow = Curses.ACS_UARROW;
891890 //DownArrow = Curses.ACS_DARROW;
892891
892+ Colors . TopLevel = new ColorScheme ( ) ;
893+ Colors . Base = new ColorScheme ( ) ;
894+ Colors . Dialog = new ColorScheme ( ) ;
895+ Colors . Menu = new ColorScheme ( ) ;
896+ Colors . Error = new ColorScheme ( ) ;
897+
893898 if ( Curses . HasColors ) {
894899 Curses . StartColor ( ) ;
895900 Curses . UseDefaultColors ( ) ;
896901
897- CreateColors ( ) ;
902+ Colors . TopLevel . Normal = MakeColor ( Color . Green , Color . Black ) ;
903+ Colors . TopLevel . Focus = MakeColor ( Color . White , Color . Cyan ) ;
904+ Colors . TopLevel . HotNormal = MakeColor ( Color . Brown , Color . Black ) ;
905+ Colors . TopLevel . HotFocus = MakeColor ( Color . Blue , Color . Cyan ) ;
906+ Colors . TopLevel . Disabled = MakeColor ( Color . DarkGray , Color . Black ) ;
907+
908+ Colors . Base . Normal = MakeColor ( Color . White , Color . Blue ) ;
909+ Colors . Base . Focus = MakeColor ( Color . Black , Color . Gray ) ;
910+ Colors . Base . HotNormal = MakeColor ( Color . BrightCyan , Color . Blue ) ;
911+ Colors . Base . HotFocus = MakeColor ( Color . BrightBlue , Color . Gray ) ;
912+ Colors . Base . Disabled = MakeColor ( Color . DarkGray , Color . Blue ) ;
913+
914+ // Focused,
915+ // Selected, Hot: Yellow on Black
916+ // Selected, text: white on black
917+ // Unselected, hot: yellow on cyan
918+ // unselected, text: same as unfocused
919+ Colors . Menu . Normal = MakeColor ( Color . White , Color . DarkGray ) ;
920+ Colors . Menu . Focus = MakeColor ( Color . White , Color . Black ) ;
921+ Colors . Menu . HotNormal = MakeColor ( Color . BrightYellow , Color . DarkGray ) ;
922+ Colors . Menu . HotFocus = MakeColor ( Color . BrightYellow , Color . Black ) ;
923+ Colors . Menu . Disabled = MakeColor ( Color . Gray , Color . DarkGray ) ;
924+
925+ Colors . Dialog . Normal = MakeColor ( Color . Black , Color . Gray ) ;
926+ Colors . Dialog . Focus = MakeColor ( Color . White , Color . DarkGray ) ;
927+ Colors . Dialog . HotNormal = MakeColor ( Color . Blue , Color . Gray ) ;
928+ Colors . Dialog . HotFocus = MakeColor ( Color . Blue , Color . DarkGray ) ;
929+ Colors . Dialog . Disabled = MakeColor ( Color . DarkGray , Color . Gray ) ;
930+
931+ Colors . Error . Normal = MakeColor ( Color . Red , Color . White ) ;
932+ Colors . Error . Focus = MakeColor ( Color . White , Color . Red ) ;
933+ Colors . Error . HotNormal = MakeColor ( Color . Black , Color . White ) ;
934+ Colors . Error . HotFocus = MakeColor ( Color . Black , Color . Red ) ;
935+ Colors . Error . Disabled = MakeColor ( Color . DarkGray , Color . White ) ;
898936 } else {
899- CreateColors ( false ) ;
900-
901937 Colors . TopLevel . Normal = Curses . COLOR_GREEN ;
902938 Colors . TopLevel . Focus = Curses . COLOR_WHITE ;
903939 Colors . TopLevel . HotNormal = Curses . COLOR_YELLOW ;
0 commit comments