qml: set sourceSize on HistoryItemDelegate icon
What changed, and why it matters
This commit is a minor memory-use optimization for the Electrum mobile/QML user interface. It tells Qt to keep only the needed icon size in memory instead of loading the full 256x256 image. There is no security issue here.
No security action needed. Treat as a normal UI/memory optimization patch.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds sourceSize.width and sourceSize.height bindings to an Image element in HistoryItemDelegate.qml. Per Qt documentation, sourceSize limits the pixel buffer retained for the loaded image, reducing memory consumption when a large source asset is displayed at a smaller size. The change is purely a resource-usage improvement.
Changed components
electrum/gui/qml/components/controls/HistoryItemDelegate.qmlInspect captured patch +2 / −0
diff --git a/electrum/gui/qml/components/controls/HistoryItemDelegate.qml b/electrum/gui/qml/components/controls/HistoryItemDelegate.qml
index 769c7e4..c5a96e2 100644
--- a/electrum/gui/qml/components/controls/HistoryItemDelegate.qml
+++ b/electrum/gui/qml/components/controls/HistoryItemDelegate.qml
@@ -75,6 +75,8 @@ Item {
Layout.preferredHeight: constants.iconSizeLarge
Layout.alignment: Qt.AlignVCenter
Layout.rowSpan: 2
+ sourceSize.width: constants.iconSizeLarge
+ sourceSize.height: constants.iconSizeLarge
source: model.lightning
? '../../../icons/lightning.png'
: model.complete && model.section != 'local'
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.