Boot manager: drop the window lights, keep the title bar

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EVRhxi9zpdW2uDUN4FVcao
This commit is contained in:
Nexoniarz 2026-10-26 16:54:39 +01:00
commit b3785343f8
2 changed files with 2 additions and 21 deletions

View file

@ -304,7 +304,7 @@ ui_splash(const char *subtitle)
/* --- Niveus ----------------------------------------------------------------- /* --- Niveus -----------------------------------------------------------------
* *
* The boot manager is drawn in the same language as the rest of the system * The boot manager is drawn in the same language as the rest of the system
* (docs/Website/niveus): windows are solid and carry three lights, controls are * (docs/Website/niveus): windows are solid, controls are
* bevelled keys with light falling across them, fields are wells cut into the * bevelled keys with light falling across them, fields are wells cut into the
* surface, and the ground under all of it is warm graphite rather than blue. * surface, and the ground under all of it is warm graphite rather than blue.
* *
@ -335,9 +335,6 @@ ui_splash(const char *subtitle)
#define NV_TXT 0xECEAE5u #define NV_TXT 0xECEAE5u
#define NV_TXT2 0xA9A7A1u #define NV_TXT2 0xA9A7A1u
#define NV_TXT3 0x74726Du #define NV_TXT3 0x74726Du
#define NV_LIGHT_CLOSE 0xFF5F57u
#define NV_LIGHT_MIN 0xFEBC2Eu
#define NV_LIGHT_ZOOM 0x28C840u
#define S(n) ((n) * SC) #define S(n) ((n) * SC)
#define WHITE 0xFFFFFFu #define WHITE 0xFFFFFFu
@ -491,17 +488,6 @@ shadow(int x, int y, int w, int h, int r)
} }
} }
static void
light(int x, int y, int d, ui_u32 colour, int tb_y, int tb_h)
{
ui_u32 top = mix(colour, WHITE, 28, 100);
ui_u32 bot = mix(colour, BLACK, 22, 100);
ui_u32 rim = mix(colour, BLACK, 62, 100);
rrect(x - SC, y - SC, d + 2 * SC, d + 2 * SC, d / 2 + SC, rim, rim,
NV_TITLE_TOP, NV_TITLE_BOT, tb_y, tb_h);
rrect(x, y, d, d, d / 2, top, bot, rim, rim, 0, 1);
}
/* --- the pointer ----------------------------------------------------------- */ /* --- the pointer ----------------------------------------------------------- */
#define CUR_W 12 #define CUR_W 12
@ -598,11 +584,6 @@ window(int x, int y, int w, int h, const char *title)
ui_fill_rect(x + SC, y + SC + tb - SC, w - 2 * SC, SC, NV_WIN_EDGE); ui_fill_rect(x + SC, y + SC + tb - SC, w - 2 * SC, SC, NV_WIN_EDGE);
ui_fill_rect(x + r, y + SC, w - 2 * r, SC, NV_HILITE); ui_fill_rect(x + r, y + SC, w - 2 * r, SC, NV_HILITE);
int d = S(12), ly = y + SC + (tb - d) / 2, lx = x + S(18);
light(lx, ly, d, NV_LIGHT_CLOSE, y + SC, tb);
light(lx + S(20), ly, d, NV_LIGHT_MIN, y + SC, tb);
light(lx + S(40), ly, d, NV_LIGHT_ZOOM, y + SC, tb);
int tw = nv_width(F_BODY, title); int tw = nv_width(F_BODY, title);
int base = y + SC + (tb - nv_height(F_BODY)) / 2 + F_BODY->ascent; int base = y + SC + (tb - nv_height(F_BODY)) / 2 + F_BODY->ascent;
nv_text(F_BODY, x + (w - tw) / 2, base, title, NV_TXT2, nv_text(F_BODY, x + (w - tw) / 2, base, title, NV_TXT2,

View file

@ -334,7 +334,7 @@ is a mode switch whose failure mode is a triple fault with no console. The
F8 (or `o` on a serial line) opens the boot manager. It used to be a text list F8 (or `o` on a serial line) opens the boot manager. It used to be a text list
on a dark plate; it is now drawn in the Niveus language the site is drawn in on a dark plate; it is now drawn in the Niveus language the site is drawn in
(`docs/Website/niveus`): a window with three lights, keys with a lit upper edge (`docs/Website/niveus`): a window with a title bar, keys with a lit upper edge
and a shadow beneath, panels cut into the surface as wells, a graphite ground and a shadow beneath, panels cut into the surface as wells, a graphite ground
that darkens towards the bottom, and the mark above the list. that darkens towards the bottom, and the mark above the list.