feat(ui): layout polish — fill dead space, pair/box/collapse, warning weight, dialog glass
Implements the layout-improvement suggestions from the layout audit (visual arrangement only; no functionality added or removed): - Send/Receive: the recent-activity list now grows to fill the space below the fixed compose/receive card (more history visible), with a centered empty-state when there is none — instead of leaving dead canvas. - Shield/Merge: pair the Fee and UTXO-Limit fields on one row to tighten vertical rhythm. - Market: extend + frame the portfolio group-list as one contained panel (with a bottom edge) and center its empty-state, closing the previously un-anchored gap. - Overlay dialogs: raise the card glass fill/border alpha (35/50 -> 60/90 of 255) so the dialog card reads as a distinct surface over busy backdrops (global, all overlays). - Wallets: size the list height to the actual wallet count instead of always reserving 7 rows, removing the large gap before the scan/create prompts (still scrolls when many). - Contacts: width-aware address truncation shows more of the address on wide rows. - Transfer Funds: give the "sends the full balance" warning a warning icon + color so the stakes stand out from the neutral result-preview lines. - First-run wizard: collapse a completed Step 1 (Appearance) to the compact pill like Step 2, so a finished step is no longer taller than the active one. - Explorer: distribute the Chain card's two stats to match the density of the sibling metrics grid. - Validate Address: a "Results will appear here" caption fills the pre-interaction blank. - Change Passphrase: add the warning banner its sibling security dialogs have. - Migration ShowSeed: box the 24-word mnemonic grid (a GlassSectionScope behind the existing RenderSeedWordGrid) so the critical secret reads as a distinct artifact — purely visual, no seed/logic/state change. Verified at 1280 across full-node + Lite + Windows (ctest green) and an adversarial diff review (clean). New i18n key backfilled into all 8 languages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -71,9 +71,12 @@ public:
|
||||
const int kMaxVisibleRows = 7;
|
||||
ImFont* nameFont = Type().subtitle1();
|
||||
ImFont* metaFont = Type().caption();
|
||||
// The list is always sized to its MAX height (kMaxVisibleRows) for a consistent modal size — it
|
||||
// does not shrink to fit a few wallets; fewer rows leave empty space, more than 7 scroll.
|
||||
const int visRows = kMaxVisibleRows;
|
||||
// Size the list to the ACTUAL wallet count so a few wallets sit tight against the controls below
|
||||
// instead of stranding ~200px of empty rows before the create/scan prompts; cap at kMaxVisibleRows
|
||||
// (more than that scrolls within the cap). An empty list keeps two rows of height so the centered
|
||||
// empty-state hint (drawn inside the list child) still has room to show.
|
||||
const int numWallets = (int)s_rows.size();
|
||||
const int visRows = numWallets <= 0 ? 2 : std::min(numWallets, kMaxVisibleRows);
|
||||
const float cardPadY = Layout::spacingMd(); // roomier cards (was spacingSm)
|
||||
const float walRowH = cardPadY * 2.0f + nameFont->LegacySize + Layout::spacingSm() + metaFont->LegacySize;
|
||||
const float cardGap = Layout::spacingMd(); // more breathing room between wallet cards
|
||||
@@ -421,9 +424,10 @@ public:
|
||||
ImGui::Dummy(ImVec2(rowW, walRowH));
|
||||
if (i + 1 < s_rows.size()) ImGui::Dummy(ImVec2(rowW, cardGap));
|
||||
}
|
||||
// Empty-state nudge: the list sits at a fixed max height, so a handful of wallets leave blank
|
||||
// space below. When there's real room to spare, fill it with a subtle centered hint (a folder
|
||||
// glyph + one line) instead of dead space; it's purely decorative — the actions live below.
|
||||
// Empty-state nudge: the list is now sized to the actual wallet count, so a populated list has
|
||||
// no room to spare and this draws nothing (the cards butt up against the controls below). It
|
||||
// fires only when the list is EMPTY (the reserved rows leave room): a subtle centered hint (a
|
||||
// folder glyph + one line) instead of a blank box; purely decorative — the actions live below.
|
||||
{
|
||||
const float remainY = ImGui::GetContentRegionAvail().y;
|
||||
if (remainY > walRowH * 1.6f) {
|
||||
|
||||
Reference in New Issue
Block a user