fix(ui): prevent text/button cutoff and scale hand-drawn geometry at HiDPI
Findings from a UI-cutoff audit — each is a spot where an in-tree helper (truncateMiddle / TruncateToWidth / measured button width / the *dpiScale/*hs factors) was bypassed: - notifications: the toast-pill height/padding/icon-gap were raw logical px while the icon/text drawn inside are DPI-baked, so they clipped the pill at HiDPI. Scale the geometry by dpiScale (not the already-scaled glyph metrics). - settings: in the two-column NODE & SECURITY layout the data-directory path could overrun into the Daemon-binary column (shared draw list, no clip rect between them). Middle-ellipsize it to the column width; the full path stays in the tooltip + click-to-open + copy. - send: the "Confirm & Send" button width came straight from the schema and was never measured against the label, clipping the Russian translation on the pre-broadcast dialog. Size to max(schema width, measured label + padding). - balance: the recent-tx address-column offset missed the `* hs` DPI factor its sibling (amount-right-margin) uses, overlapping the type label at HiDPI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -820,7 +820,7 @@ void RenderSharedRecentTx(App* app, float recentH, float availW, float hs, float
|
||||
dl->AddText(capFont, capFont->LegacySize,
|
||||
ImVec2(tx_x, rowPos.y + 2 * dp), OnSurfaceMedium(), display.typeText.c_str());
|
||||
|
||||
float addrX = tx_x + S.drawElement("tabs.balance", "recent-tx-addr-offset").sizeOr(65.0f);
|
||||
float addrX = tx_x + S.drawElement("tabs.balance", "recent-tx-addr-offset").sizeOr(65.0f) * hs;
|
||||
dl->AddText(capFont, capFont->LegacySize,
|
||||
ImVec2(addrX, rowPos.y + 2 * dp), OnSurfaceDisabled(), display.addressText.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user