fix(ui): finish HiDPI pass — cosmetic ×dpiScale, narrow-width reflow, recent-list reserves
The tail of the DPI/font-scale/responsiveness audit — ~26 remaining findings.
Container / recent-list (Theme-1 leftovers):
- Send: drop NoScrollbar|NoScrollWithMouse on ##SendFormScroll so Recent Sends is
reachable at font_scale 1.5 (parity with receive).
- Receive: cap the QR/form card via std::min(mainCardTargetH, availH - recentReserve)
so RECENT RECEIVED stays on-screen (identity at 1.0x).
- Wallets dialog: size the capped-mode list to whole rows so it no longer clips a
partial row / crowds "Create a new wallet".
Narrow-width (1024px) reflow:
- Console toolbar reserves space for ALL trailing controls (both icon toggles + zoom
buttons) so the +/- zoom no longer runs off-window.
- History sort combo sized to its measured widest localized label ("Newest first").
- Settings Theme/Layout/Language row: scale the wide→stacked breakpoint by dpiScale so
it drops to full-width stacked combos at 1.5x (Consolidated Card no longer clips).
- Recent-tx type label: derive the address column X from the measured label width so it
can't collide at narrow widths.
- Mining Recent Pool Payouts: floor the panel height to fit the empty-state caption.
Cosmetic ×dpiScale() on absolute geometry (no-ops at 1.0x): mining SOLO|POOL toggle &
idle combos, market pair-chips, password/PIN strength bars, receive/send currency
toggles, explorer search bar/rows/rounding, About-card logo, chat empty-state wrap,
recent-list address/time offsets, address-toolbar & two-row action buttons, console
line-gap/status-dot/pane rounding.
Verified at font_scale 1.5 and at 1024px across full-node + Lite + Windows (ctest
green) and an adversarial diff review (one over-reserve regression fixed).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -200,7 +200,20 @@ public:
|
||||
// create/scan/footer controls so it scrolls internally and those stay visible. Uncapped,
|
||||
// it equals the content height exactly (no spurious scrollbar — the common case).
|
||||
float listHFit = listH;
|
||||
if (capped) listHFit = std::max(walRowH, ImGui::GetContentRegionAvail().y - belowH);
|
||||
if (capped) {
|
||||
// Fill the height left above the pinned controls, but clip on a CLEAN row boundary:
|
||||
// floor the available space to a whole number of card strides (walRowH + cardGap, the
|
||||
// per-card advance from the loop) so the list never ends mid-row. Keep the same bottom
|
||||
// pad as the uncapped listH so the last visible card stays off the clip edge.
|
||||
const float stride = walRowH + cardGap;
|
||||
const float avail = ImGui::GetContentRegionAvail().y - belowH;
|
||||
// N rows occupy N*walRowH + (N-1)*cardGap = N*stride - cardGap; solve for the most whole
|
||||
// rows that fit (a non-negative cast truncates toward zero = floor here), clamped to at
|
||||
// least one so a tiny viewport still shows a row.
|
||||
int nRows = stride > 0.0f ? (int)((avail + cardGap) / stride) : 1;
|
||||
if (nRows < 1) nRows = 1;
|
||||
listHFit = (float)nRows * stride - cardGap + Layout::spacingSm();
|
||||
}
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
|
||||
// NoScrollWithMouse + ApplySmoothScroll gives the wheel the same eased scrolling as the
|
||||
// Settings page (ApplySmoothScroll handles the wheel itself, so let it own that input).
|
||||
@@ -253,13 +266,13 @@ public:
|
||||
bool hov = ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect(rMin, rMax);
|
||||
|
||||
// Card background + state
|
||||
GlassPanelSpec g; g.rounding = 10.0f; g.fillAlpha = hov ? 40 : 26; g.borderAlpha = 45;
|
||||
GlassPanelSpec g; g.rounding = 10.0f * dp; g.fillAlpha = hov ? 40 : 26; g.borderAlpha = 45;
|
||||
DrawGlassPanel(dl, rMin, rMax, g);
|
||||
if (isCurrent) {
|
||||
dl->AddRectFilled(rMin, rMax, WithAlpha(Success(), 16), 10.0f);
|
||||
dl->AddRect(rMin, rMax, WithAlpha(Success(), 130), 10.0f, 0, 1.6f * dp);
|
||||
dl->AddRectFilled(rMin, rMax, WithAlpha(Success(), 16), 10.0f * dp);
|
||||
dl->AddRect(rMin, rMax, WithAlpha(Success(), 130), 10.0f * dp, 0, 1.6f * dp);
|
||||
} else if (hov) {
|
||||
dl->AddRect(rMin, rMax, WithAlpha(OnSurface(), 70), 10.0f, 0, 1.0f);
|
||||
dl->AddRect(rMin, rMax, WithAlpha(OnSurface(), 70), 10.0f * dp, 0, 1.0f);
|
||||
}
|
||||
|
||||
const float padX = Layout::spacingMd();
|
||||
|
||||
Reference in New Issue
Block a user