qml: FeePicker: hide "Target" line in "Manual" mode
What changed, and why it matters
This commit is a user-interface tweak for Electrum's mobile/QML fee selector. It hides a 'Target' label when the user is manually entering a fee, and uses text color to show which of the two manual inputs (fee rate vs absolute fee) was edited last. There is no security-relevant change.
No security action needed. This is a cosmetic UI change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies FeePicker.qml and qetxfinalizer.py. It adds a new boolean property isUserFeerateLast to track whether the user last edited the feerate field or the absolute fee field, and uses that property to color the active input. It also hides the target block when manualFeeEntry is enabled. No transaction logic, validation, cryptography, or network code is changed.
Changed components
electrum/gui/qml/components/controls/FeePicker.qmlelectrum/gui/qml/qetxfinalizer.pyInspect captured patch +20 / −2
diff --git a/electrum/gui/qml/components/controls/FeePicker.qml b/electrum/gui/qml/components/controls/FeePicker.qml
index afbabb1..df97d5b 100644
--- a/electrum/gui/qml/components/controls/FeePicker.qml
+++ b/electrum/gui/qml/components/controls/FeePicker.qml
@@ -74,14 +74,14 @@ Item {
Layout.preferredWidth: 1
text: targetLabel
color: Material.accentColor
- visible: showPicker
+ visible: showPicker && !manualFeeEntry
}
Label {
Layout.fillWidth: true
Layout.preferredWidth: 2
text: finalizer.target
- visible: showPicker
+ visible: showPicker && !manualFeeEntry
}
RowLayout {
@@ -122,6 +122,7 @@ Item {
}
Label {
+ Layout.fillWidth: true
Layout.preferredWidth: 1
text: qsTr('Rate')
color: Material.accentColor
@@ -139,6 +140,7 @@ Item {
id: rate
Layout.fillWidth: true
text: finalizer.userFeerate
+ color: finalizer.isUserFeerateLast ? Material.foreground : Material.accentColor
inputMethodHints: Qt.ImhDigitsOnly
validator: RegularExpressionValidator {
regularExpression: /^[0-9]*\.[0-9]?$/
@@ -158,6 +160,7 @@ Item {
id: absolute
Layout.fillWidth: true
text: finalizer.userFee
+ color: finalizer.isUserFeerateLast ? Material.accentColor : Material.foreground
inputMethodHints: Qt.ImhDigitsOnly
validator: RegularExpressionValidator {
regularExpression: /^[0-9]*$/
@@ -175,6 +178,7 @@ Item {
}
Label {
+ Layout.fillWidth: true
Layout.preferredWidth: 1
visible: showPicker && manualFeeEntry
color: Material.accentColor
diff --git a/electrum/gui/qml/qetxfinalizer.py b/electrum/gui/qml/qetxfinalizer.py
index dcc6b60..bf12004 100644
--- a/electrum/gui/qml/qetxfinalizer.py
+++ b/electrum/gui/qml/qetxfinalizer.py
@@ -158,6 +158,7 @@ class TxFeeSlider(FeeSlider):
self._feeRate = ''
self._userFee = ''
self._userFeerate = ''
+ self._is_user_feerate_last = True
self._rbf = False
self._tx = None # type: Optional[PartialTransaction]
self._inputs = []
@@ -201,6 +202,7 @@ class TxFeeSlider(FeeSlider):
user_fee = int(userFee) if userFee else 0
self._fee_policy = FeePolicy(f'fixed:{user_fee}')
self.userFeeChanged.emit()
+ self.isUserFeerateLast = False
self.update()
userFeerateChanged = pyqtSignal()
@@ -217,8 +219,20 @@ class TxFeeSlider(FeeSlider):
user_feerate = int(as_decimal * 1000)
self._fee_policy = FeePolicy(f'feerate:{user_feerate}')
self.userFeerateChanged.emit()
+ self.isUserFeerateLast = True
self.update()
+ isUserFeerateLastChanged = pyqtSignal()
+ @pyqtProperty(bool, notify=isUserFeerateLastChanged)
+ def isUserFeerateLast(self):
+ return self._is_user_feerate_last
+
+ @isUserFeerateLast.setter
+ def isUserFeerateLast(self, isUserFeerateLast):
+ if self._is_user_feerate_last != isUserFeerateLast:
+ self._is_user_feerate_last = isUserFeerateLast
+ self.isUserFeerateLastChanged.emit()
+
rbfChanged = pyqtSignal()
@pyqtProperty(bool, notify=rbfChanged)
def rbf(self):
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.