kivy: display value of recommended fee
This commit is contained in:
@@ -4,6 +4,7 @@ from kivy.properties import ObjectProperty
|
|||||||
from kivy.lang import Builder
|
from kivy.lang import Builder
|
||||||
|
|
||||||
from electrum.bitcoin import RECOMMENDED_FEE
|
from electrum.bitcoin import RECOMMENDED_FEE
|
||||||
|
from electrum.i18n import _
|
||||||
|
|
||||||
Builder.load_string('''
|
Builder.load_string('''
|
||||||
<FeeDialog@Popup>
|
<FeeDialog@Popup>
|
||||||
@@ -23,18 +24,24 @@ Builder.load_string('''
|
|||||||
id: slider
|
id: slider
|
||||||
range: 0, 100
|
range: 0, 100
|
||||||
on_value: root.on_slider(self.value)
|
on_value: root.on_slider(self.value)
|
||||||
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'horizontal'
|
orientation: 'horizontal'
|
||||||
size_hint: 1, 0.5
|
size_hint: 1, 0.5
|
||||||
Label:
|
Label:
|
||||||
text: _('Dynamic fees')
|
text: _('Dynamic Fees')
|
||||||
CheckBox:
|
CheckBox:
|
||||||
id: dynfees
|
id: dynfees
|
||||||
on_active: root.on_checkbox(self.active)
|
on_active: root.on_checkbox(self.active)
|
||||||
|
BoxLayout:
|
||||||
|
orientation: 'horizontal'
|
||||||
|
size_hint: 1, None
|
||||||
|
Label:
|
||||||
|
id: reco
|
||||||
|
font_size: '6pt'
|
||||||
|
text_size: self.size
|
||||||
|
text: ''
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 1
|
size_hint: 1, 1
|
||||||
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'horizontal'
|
orientation: 'horizontal'
|
||||||
size_hint: 1, 0.5
|
size_hint: 1, 0.5
|
||||||
@@ -68,6 +75,8 @@ class FeeDialog(Factory.Popup):
|
|||||||
self.update_slider()
|
self.update_slider()
|
||||||
self.update_text()
|
self.update_text()
|
||||||
|
|
||||||
|
if self.app.network and self.app.network.fee:
|
||||||
|
self.ids.reco.text = _('Recommended fee for inclusion in the next two blocks') + ': ' + self.app.format_amount_and_units(self.app.network.fee) +'/kb'
|
||||||
|
|
||||||
def update_text(self):
|
def update_text(self):
|
||||||
self.ids.fee_per_kb.text = self.get_fee_text()
|
self.ids.fee_per_kb.text = self.get_fee_text()
|
||||||
|
|||||||
Reference in New Issue
Block a user