qml: audit the design system and adopt shared components

bitcoin-core/gui-qml: PR #1052

1 minor finding · 1 suggestion

Earlier concerns neither republished nor resolved: 3 minor findings · 1 suggestion. See the Run archive for their assessments.

Findings

Link

[minor] · Return confirms “Send all available funds?” without focusing its button

After the sweep alert opens, a fresh Return/Enter can submit the reviewed transaction without focusing “Send all funds”, weakening the extra confirmation while leaving transaction-identity and wallet-unlock checks intact.

Location: qml/controls/AlertPopup.qml:161 (head).

Details and suggested fix

requestSend() opens sweepAlert without an initialFocusItem, so DialogPopup focuses its content. The new key handlers call accept(), which selects the only Normal-role action. “Send all funds” inherits that role and calls commitSend(). Unlike autorepeat or a press during the opening transition, a fresh Return after opening passes the guards. For a sendable unencrypted wallet, this reaches wallet.sendTransaction() without another GUI confirmation; a locked wallet still requires unlocking, and isCurrentTransaction() rejects a replaced transaction. The base alert handled only Escape from its content.

Restrict implicit Return acceptance to editable fields, as design.md describes, while preserving activation of explicitly focused buttons. Add a tst_sendcreate regression that opens sendSweepAlert, presses Return from its initial focus and checks that sendTransactionCalls remains unchanged.


Optional improvements

Link

[suggestion] · Reduced motion reads the OS setting only at startup

On macOS and Windows, an OS motion change during a session would leave animations and Display using the startup sample, including a disabled switch when that sample requested reduced motion.

Location: qml/motionpreference.h:18 (head).

Details and suggested fix

StartupMotionMode() samples the OS preference when the per-engine singleton is created, then stores it behind a CONSTANT property. Neither platform implementation observes changes. Enabling reduced motion later therefore requires the app override or a restart. Conversely, disabling it after an initially reduced sample leaves the Display row checked and disabled with “Following your system setting.” Startup-only sampling may be deliberate, as the header describes an initial mode. If retaining it, state in the row description that system changes require restarting. To follow the OS live instead, expose a notifying property and refresh it from platform change notifications on the object's thread, keeping the test override separate.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.