feat(console): persist accent toggle + add monochrome-text toggle
Persist the two console output display preferences and add a second toolbar toggle for monochrome text. - Persistence: new Settings fields console_line_accents / console_text_color (both default true, matching the ConsoleTab statics so an upgrade re-save can't flip visible behavior). Restored into the statics at startup in the App constructor, and saved from a diff-and-save after the console renders (only when a value actually changed — save() is disk I/O). The startup restore also fixes a pre-existing bug: scanline was only synced from settings when the Settings page or first-run wizard ran, so an existing wallet ignored a saved scanline preference on launch. - Monochrome text: a new toolbar toggle (FORMAT_COLOR_TEXT, dimmed when off) next to the accent toggle. channelTextColor() early-returns the neutral COLOR_RESULT for every channel (and JSON syntax role) when off, leaving the left accent bars independent. COLOR_RESULT is contrast-floored per theme, so text stays readable on light and dark terminals. Adds console_toggle_text_color to the English source + all 8 translations. Verified: both toggles independent, persistence round-trips across restart, monochrome readable on light + dark skins. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -189,6 +189,13 @@ public:
|
||||
bool getScanlineEnabled() const { return scanline_enabled_; }
|
||||
void setScanlineEnabled(bool v) { scanline_enabled_ = v; }
|
||||
|
||||
// Console output appearance: per-line left color accent bars, and per-channel text coloring.
|
||||
// (Defaults match the ConsoleTab statics so an upgrade re-save doesn't flip visible behavior.)
|
||||
bool getConsoleLineAccents() const { return console_line_accents_; }
|
||||
void setConsoleLineAccents(bool v) { console_line_accents_ = v; }
|
||||
bool getConsoleTextColor() const { return console_text_color_; }
|
||||
void setConsoleTextColor(bool v) { console_text_color_ = v; }
|
||||
|
||||
// Hidden addresses (addresses hidden from the UI by the user)
|
||||
const std::set<std::string>& getHiddenAddresses() const { return hidden_addresses_; }
|
||||
bool isAddressHidden(const std::string& addr) const { return hidden_addresses_.count(addr) > 0; }
|
||||
@@ -482,6 +489,8 @@ private:
|
||||
std::string balance_layout_ = "classic";
|
||||
int portfolio_style_ = 0; // Market portfolio row style (0 single / 1 two-line / 2 hero)
|
||||
bool scanline_enabled_ = true;
|
||||
bool console_line_accents_ = true; // left color accent bars in console output
|
||||
bool console_text_color_ = true; // per-channel text coloring in console output
|
||||
std::set<std::string> hidden_addresses_;
|
||||
std::set<std::string> favorite_addresses_;
|
||||
std::map<std::string, AddressMeta> address_meta_;
|
||||
|
||||
Reference in New Issue
Block a user