feat(contacts): switchable Cards / List / Table view for the address list
Add a persisted view toggle so the contacts address list can be rendered three ways, moving it away from a bare data-grid toward a Material look: - Cards: tactile rounded cards with a circular Z/T type-avatar, label over a muted truncated address, trailing globe badge, primary-tint + outline selection, hover fill, and a centred Material empty state. - List: borderless two-line rows (same avatar + label/address) with hover tint and a thin per-row divider — denser than cards. - Table: the previous 3-column table, material-ized (grid borders dropped, row backgrounds + interactive sort kept). The toggle is an icon SegmentedControl (view-agenda / view-list / table-rows) right-aligned on the toolbar; the choice persists via a new contacts_view_mode_ setting (0 cards / 1 list / 2 table, mirroring portfolio_style_). Cards/List sort by label; Table keeps its sortable headers. All geometry is dpiScale()-aware; the globe badge is drawn in the icon font in every mode. Default is Cards. Build + ctest + hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -174,6 +174,8 @@ bool Settings::load(const std::string& path)
|
||||
}
|
||||
loadScalar(j, "portfolio_style", portfolio_style_);
|
||||
if (portfolio_style_ < 0 || portfolio_style_ > 2) portfolio_style_ = 0;
|
||||
loadScalar(j, "contacts_view_mode", contacts_view_mode_);
|
||||
if (contacts_view_mode_ < 0 || contacts_view_mode_ > 2) contacts_view_mode_ = 0;
|
||||
loadScalar(j, "scanline_enabled", scanline_enabled_);
|
||||
loadScalar(j, "console_line_accents", console_line_accents_);
|
||||
loadScalar(j, "console_text_color", console_text_color_);
|
||||
@@ -428,6 +430,7 @@ bool Settings::save(const std::string& path)
|
||||
j["window_opacity"] = window_opacity_;
|
||||
j["balance_layout"] = balance_layout_; // saved as string ID
|
||||
j["portfolio_style"] = portfolio_style_;
|
||||
j["contacts_view_mode"] = contacts_view_mode_;
|
||||
j["scanline_enabled"] = scanline_enabled_;
|
||||
j["console_line_accents"] = console_line_accents_;
|
||||
j["console_text_color"] = console_text_color_;
|
||||
|
||||
Reference in New Issue
Block a user