feat(console): terminal polish — lite/color-coded toggles, dark bg, monospace font
Work through the console items in todo.md: - Lite filter toggles (#5): replace the single hasLogFilters() bool with a ConsoleLogFilterCaps struct so each backend advertises which toggles apply. Full node = daemon/errors/rpc-trace/app; lite = errors-only + app (its diagnostics ring maps to the App/Error channels; the text filter is always shown). Lite previously showed no toggles at all. - Color-coded toggles (#6): each filter checkbox is tinted with its channel's accent color (daemon=blue, errors=red, rpc=secondary, app=teal) via a new channelAccentColor() that also drives the output's left accent bar — one source of truth for channel color. - Darker terminal look (#7): drop the light glass rectangle on the input; both output and input now get a terminal-dark overlay (tabs.console.bg-darken-alpha, default 110) and the input field blends into it (transparent frame bg). - Monospace font (#8): bundle Ubuntu Mono (res/fonts/UbuntuMono-R.ttf, Ubuntu Font License — same family as the existing Ubuntu fonts) via INCBIN, load it at caption size as Type().mono(), and render console output + input in it so pretty-printed JSON columns and terminal text align. Falls back to the proportional caption font if unavailable. Full-node + lite build clean; ctest green; source hygiene clean; sandboxed startup smoke confirms the mono font loads + atlas builds without crashing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,7 @@ namespace dragonx {
|
||||
namespace ui {
|
||||
|
||||
class ConsoleCommandExecutor;
|
||||
struct ConsoleLogFilterCaps;
|
||||
|
||||
/**
|
||||
* @brief Console tab — a rich terminal shared by the full-node and lite variants.
|
||||
@@ -92,6 +93,9 @@ private:
|
||||
// line stores only its semantic ConsoleChannel (in ConsoleModel); the text color and
|
||||
// the left accent-bar color are both derived from it at draw time.
|
||||
ImU32 channelTextColor(ConsoleChannel channel) const;
|
||||
// Saturated accent color for a channel — the left accent-bar color, also used to tint the
|
||||
// matching toolbar filter toggle. 0 for channels that get no accent (result/JSON/None).
|
||||
static ImU32 channelAccentColor(ConsoleChannel channel);
|
||||
|
||||
// Drain the thread-safe ingest queue into the visible model (once per frame, main
|
||||
// thread), applying the line cap + selection/scroll bookkeeping for the new lines.
|
||||
@@ -105,7 +109,7 @@ private:
|
||||
// renderToolbar() draws the top bar; these are its sub-steps:
|
||||
void renderToolbar(ConsoleCommandExecutor& exec);
|
||||
void drawToolbarStatus(ConsoleCommandExecutor& exec); // backend status dot + label
|
||||
void drawLogFilterToggles(); // daemon/errors/rpc/app checkboxes
|
||||
void drawLogFilterToggles(const ConsoleLogFilterCaps& caps); // color-coded filter checkboxes
|
||||
void drawFilterInput(); // text filter + match count
|
||||
void drawZoomControls(); // zoom -/+ buttons
|
||||
|
||||
|
||||
Reference in New Issue
Block a user