commit f5d557cae9ec13daebfe1879ed0c1c01b7eaee7d
parent aafd3b929b4403b73e4569f6bb058f83c9ce8a8d
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 6 Feb 2018 17:53:34 +0100
improve fee tooltips
Diffstat:
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/gui/kivy/uix/dialogs/fee_dialog.py b/gui/kivy/uix/dialogs/fee_dialog.py
@@ -18,7 +18,17 @@ Builder.load_string('''
orientation: 'horizontal'
size_hint: 1, 0.5
Label:
- id: fee_per_kb
+ text: (_('Target') if dynfees.active else _('Fixed rate')) + ':'
+ Label:
+ id: fee_target
+ text: ''
+ BoxLayout:
+ orientation: 'horizontal'
+ size_hint: 1, 0.5
+ Label:
+ text: (_('Current rate') if dynfees.active else _('Estimate')) + ':'
+ Label:
+ id: fee_estimate
text: ''
Slider:
id: slider
@@ -77,7 +87,9 @@ class FeeDialog(Factory.Popup):
def update_text(self):
value = int(self.ids.slider.value)
- self.ids.fee_per_kb.text = self.get_fee_text(value)
+ target, estimate = self.get_fee_text(value)
+ self.ids.fee_target.text = target
+ self.ids.fee_estimate.text = estimate
def update_slider(self):
slider = self.ids.slider
@@ -93,8 +105,7 @@ class FeeDialog(Factory.Popup):
fee_rate = self.config.depth_to_fee(pos) if mempool else self.config.eta_to_fee(pos)
else:
fee_rate = self.config.static_fee(pos)
- target, tooltip = self.config.get_fee_text(pos, dyn, mempool, fee_rate)
- return target
+ return self.config.get_fee_text(pos, dyn, mempool, fee_rate)
def on_ok(self):
value = int(self.ids.slider.value)
diff --git a/gui/qt/fee_slider.py b/gui/qt/fee_slider.py
@@ -31,8 +31,11 @@ class FeeSlider(QSlider):
def get_tooltip(self, pos, fee_rate):
mempool = self.config.get('mempool_fees')
- text, tooltip = self.config.get_fee_text(pos, self.dyn, mempool, fee_rate)
- return text + '\n' + tooltip
+ target, estimate = self.config.get_fee_text(pos, self.dyn, mempool, fee_rate)
+ if self.dyn:
+ return _('Target') + ': ' + target + '\n' + _('Current rate') + ': ' + estimate
+ else:
+ return _('Fixed rate') + ': ' + target + '\n' + _('Estimate') + ': ' + estimate
def update(self):
with self.lock: