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:
@@ -184,6 +184,9 @@ public:
|
||||
// Left/Right arrows on the Market tab (like the Overview layouts).
|
||||
int getPortfolioStyle() const { return portfolio_style_; }
|
||||
void setPortfolioStyle(int v) { portfolio_style_ = (v < 0 || v > 2) ? 0 : v; }
|
||||
// Contacts tab address-list view: 0 = cards, 1 = list, 2 = table.
|
||||
int getContactsViewMode() const { return contacts_view_mode_; }
|
||||
void setContactsViewMode(int v) { contacts_view_mode_ = (v < 0 || v > 2) ? 0 : v; }
|
||||
|
||||
// Console scanline effect
|
||||
bool getScanlineEnabled() const { return scanline_enabled_; }
|
||||
@@ -490,6 +493,7 @@ private:
|
||||
#endif
|
||||
std::string balance_layout_ = "classic";
|
||||
int portfolio_style_ = 0; // Market portfolio row style (0 single / 1 two-line / 2 hero)
|
||||
int contacts_view_mode_ = 0; // Contacts address-list view (0 cards / 1 list / 2 table)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user