Trace browser: Don't let the background color get too light, and cycle
back to darker shades so I'm not squinting at low depths.
This commit is contained in:
Kartik Agaram 2020-01-20 02:53:56 -08:00
parent 9ed9188a39
commit 75bb5e4ab1
1 changed files with 1 additions and 2 deletions

View File

@ -201,8 +201,7 @@ int bg_color(int depth, int trace_index, int screen_row) {
if (depth == 0) return /*red*/1;
if (depth == 1) return /*orange*/166;
// start at black, gradually lighten at deeper levels
if (depth > 10) return TB_BLACK + 16;
return TB_BLACK + (depth - 2)*2;
return TB_BLACK + ((depth-2) % 6)*2;
}
void render_line(int screen_row, const string& s, int bg) { // -> screen