feat(receive): migrate QR + Request-payment modals to the reference design
Bring the two Receive-tab modals onto the settings-modal reference language
(presentation-only):
- struct-form BeginOverlayDialog(OverlayDialogSpec{BlurFloat, cardWidth, idSuffix})
replacing the legacy positional overload (idSuffix qrpopup / requestpay)
- StyledButton -> TactileButton (2 + 3 sites)
- drop Request-payment's description divider
No logic touched: the QR texture lifecycle, payment-URI builder, address combo,
and clipboard/notification calls are unchanged. The "DRGX" ticker stays hardcoded
per the existing codebase convention (7 sites, no currency TR key).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,7 +67,11 @@ void QRPopupDialog::render(App* app)
|
||||
// Match the key-export modal: 85% of the window width (divide out the dpiScale that
|
||||
// BeginOverlayDialog re-applies, so the final card is exactly 85% at any font scale).
|
||||
const float cardW = (0.85f * ImGui::GetMainViewport()->Size.x) / Layout::dpiScale();
|
||||
if (material::BeginOverlayDialog(TR("qr_title"), &s_open, cardW, 0.94f)) {
|
||||
material::OverlayDialogSpec ov;
|
||||
ov.title = TR("qr_title"); ov.p_open = &s_open;
|
||||
ov.style = material::OverlayStyle::BlurFloat;
|
||||
ov.cardWidth = cardW; ov.idSuffix = "qrpopup";
|
||||
if (material::BeginOverlayDialog(ov)) {
|
||||
|
||||
// Label if present
|
||||
if (!s_label.empty()) {
|
||||
@@ -120,11 +124,11 @@ void QRPopupDialog::render(App* app)
|
||||
const float total_width = w_copy + w_close + ImGui::GetStyle().ItemSpacing.x;
|
||||
ImGui::SetCursorPosX((window_width - total_width) / 2.0f);
|
||||
|
||||
if (material::StyledButton(TR("copy_address"), ImVec2(w_copy, 0), btnFont)) {
|
||||
if (material::TactileButton(TR("copy_address"), ImVec2(w_copy, 0), btnFont)) {
|
||||
ImGui::SetClipboardText(s_address.c_str());
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (material::StyledButton(TR("close"), ImVec2(w_close, 0), btnFont)) {
|
||||
if (material::TactileButton(TR("close"), ImVec2(w_close, 0), btnFont)) {
|
||||
close();
|
||||
}
|
||||
material::EndOverlayDialog();
|
||||
|
||||
Reference in New Issue
Block a user