At font_scale 1.5 (dpiScale 1.5) three fixed, non-scrolling containers clipped content off the bottom with no scroll escape: - First-run wizard: the hand-drawn cards grow ~1.5x past the fixed window, pushing Continue / Encrypt & Continue / Skip off-screen (a setup blocker). Inject a wheel-driven scroll offset into the layout seed + a scroll indicator; gate the wheel on !IsPopupOpen + NoPopupHierarchy so an open combo popup does not scroll the wizard behind it. No-op at 1.0x. - Overlay dialogs (BeginOverlayDialog): auto-height cards taller than the viewport (About, Request Payment) ran their footer off the bottom. Add a sticky per-open overflow flag that clamps the card to the viewport and makes the content child scrollable; short dialogs still center unchanged. Give the nested settings clear-history confirm its own idSuffix so it can't inherit the parent dialog's overflow state or collide on the child window id. - Balance Recent Transactions: the dp-scaled address card evicted the recent-tx list off the non-scrolling tab host. Cap the card inside RenderSharedAddressList against the space that actually remains (minus a caller-provided reserve) so the section below stays on-screen — covers all 10 balance layouts. Verified at font_scale 1.5 across full-node + Lite + Windows (ctest green) and an adversarial diff review (two low-severity regressions found + fixed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
1.4 KiB
C++
36 lines
1.4 KiB
C++
// DragonX Wallet - ImGui Edition
|
|
// Copyright 2024-2026 The Hush Developers
|
|
// Released under the GPLv3
|
|
//
|
|
// Shared rendering components used by every balance-tab layout (the animated hero, the address
|
|
// list, the recent-transactions strip, the sync bar) plus the balance-lerp animation state.
|
|
// Extracted from balance_tab.cpp so the layouts can be split into their own files later.
|
|
|
|
#pragma once
|
|
|
|
#include "imgui.h"
|
|
|
|
namespace dragonx {
|
|
class App;
|
|
namespace ui {
|
|
|
|
// Animated balance display values — lerp toward the wallet's real balances each frame. Defined in
|
|
// balance_tab.cpp (the lerp is advanced by UpdateBalanceLerp), shared with the components.
|
|
extern double s_dispTotal;
|
|
extern double s_dispShielded;
|
|
extern double s_dispTransparent;
|
|
extern double s_dispUnconfirmed;
|
|
// True while an async new-address generation is in flight.
|
|
extern bool s_generating_z_address;
|
|
|
|
void UpdateBalanceLerp(App* app);
|
|
void RenderCompactHero(App* app, ImDrawList* dl, float availW, float hs, float vs,
|
|
float heroHeightOverride = -1.0f);
|
|
void RenderSharedAddressList(App* app, float listH, float availW, float glassRound, float hs, float vs,
|
|
float reserveBelow = 0.0f);
|
|
void RenderSharedRecentTx(App* app, float recentH, float availW, float hs, float vs);
|
|
void RenderSyncBar(App* app, ImDrawList* dl, float vs);
|
|
|
|
} // namespace ui
|
|
} // namespace dragonx
|