fix(hidpi): scale security-dialog buttons, market caption, QR inset by dpiScale
HiDPI geometry debt from the audit: 15 security-dialog buttons used a raw 40px height (undersized vs the scaled label at 1.5x), the market "Updated" caption used a raw SameLine(0,12), and the QR popup's 28px overlay-inset budget wasn't scaled (wrapping the address at HiDPI). All now go through ui::Layout::dpiScale(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -74,7 +74,9 @@ void QRPopupDialog::render(App* app)
|
||||
const float addrBoxW = ImGui::CalcTextSize(chunkedAddr.c_str()).x + addrPadX * 2.0f + 2.0f;
|
||||
// The BlurFloat overlay card insets content by 28px per side (draw_helpers BeginOverlayDialog); add
|
||||
// that (+ a little slack) so the address box fits on one line under its label instead of wrapping.
|
||||
const float wantW = addrBoxW + 28.0f * 2.0f + 12.0f;
|
||||
// Scale the overlay inset (BeginOverlayDialog insets 28 LOGICAL px/side) into the same scaled space
|
||||
// as addrBoxW before the /dp conversion below, so the address box doesn't wrap at HiDPI.
|
||||
const float wantW = addrBoxW + (28.0f * 2.0f + 12.0f) * dp;
|
||||
const float maxW = 0.85f * ImGui::GetMainViewport()->Size.x;
|
||||
const float cardW = (wantW < maxW ? wantW : maxW) / dp;
|
||||
material::OverlayDialogSpec ov;
|
||||
|
||||
Reference in New Issue
Block a user