FLO data input widget behavior

This commit is contained in:
Vivek Teega 2019-01-27 18:50:07 +05:30
parent 94b7eb3015
commit 501371c001
4 changed files with 52 additions and 33 deletions

View File

@ -207,10 +207,9 @@
size: self.size
pos: self.pos
<FLODataBlueBottom@GridLayout>
item_height: dp(100)
<FLODataBlueBottom@BoxLayout>
item_height: dp(60)
foreground_color: .843, .914, .972, 1
cols: 1
padding: '12dp', 0
canvas.before:
Color:
@ -278,11 +277,9 @@
background_color: 1, .585, .878, 0
halign: 'left'
text_size: (self.width-10, None)
size_hint: 0.5, None
size_hint: 1, 1
default_text: ''
text: self.default_text
padding: '5dp', '5dp'
height: '100dp'
text_color: self.foreground_color
disabled_color: 1, 1, 1, 1
foreground_color: 1, 1, 1, 1
@ -293,6 +290,8 @@
size: self.size
pos: self.pos
<ClickableLabel@ButtonBehavior+Label>:
<BlueButton@Button>:
background_color: 1, .585, .878, 0
@ -313,6 +312,17 @@
size: self.size
pos: self.pos
<ClickableInput@ButtonBehavior+TextInput>:
readonly: True
keyboard_mode: 'managed'
canvas:
Color:
rgba: 1, 0, 0, .3
Rectangle:
size: self.size
pos: self.pos
<AddressButton@Button>:
background_color: 1, .585, .878, 0
halign: 'center'
@ -496,6 +506,7 @@ BoxLayout:
ActionOvrButton:
name: 'network'
text: _('Network')
text: _('Network')
ActionOvrButton:
name: 'settings'
text: _('Settings')

View File

@ -160,7 +160,7 @@ class ElectrumWindow(App):
self.send_screen.set_URI(uri)
def on_new_intent(self, intent):
if intent.getScheme() != 'bitcoin':
if intent.getScheme() != 'flo':
return
uri = intent.getDataString()
self.set_URI(uri)

View File

@ -69,15 +69,24 @@ HistoryScreen:
content: history_container
BoxLayout:
orientation: 'vertical'
Button:
background_color: 0, 0, 0, 0
text: app.fiat_balance if app.is_fiat else app.balance
markup: True
color: .9, .9, .9, 1
font_size: '30dp'
bold: True
RelativeLayout:
size_hint: 1, 0.25
on_release: app.is_fiat = not app.is_fiat if app.fx.is_enabled() else False
Button:
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
background_color: 0, 0, 0, 0
text: app.fiat_balance if app.is_fiat else app.balance
markup: True
color: .9, .9, .9, 1
font_size: '30dp'
bold: True
on_release: app.is_fiat = not app.is_fiat if app.fx.is_enabled() else False
Label:
pos_hint: {'center_x': 0.5, 'center_y': 0.17}
background_color: 0, 0, 0, 0
markup: True
color: .5, .5, .5, 1
font_size: '14dp'
text: "Blocks : %d" % app.num_blocks
HistoryRecycleView:
id: history_container
scroll_type: ['bars', 'content']

View File

@ -20,7 +20,7 @@ SendScreen:
SendReceiveBlueBottom:
id: blue_bottom
size_hint: 1, None
height: self.minimum_height +5
height: self.minimum_height
BoxLayout:
size_hint: 1, None
height: blue_bottom.item_height
@ -92,24 +92,23 @@ SendScreen:
text: app.fee_status
on_release: Clock.schedule_once(lambda dt: app.fee_dialog(s, True))
FLODataBlueBottom:
id: flodata_blue_bottom
size_hint: 1, None
height: self.minimum_height +5
BoxLayout:
size_hint: 1, None
height: flodata_blue_bottom.item_height
spacing: '5dp'
Image:
source: 'atlas://electrum/gui/kivy/theming/light/pen'
opacity: 0.7
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
FLODataButton:
id: flodata
text: s.flodata if s.flodata else (_('No FLO data') if root.is_pr else _('FLO data'))
disabled: root.is_pr
size_hint: 1, 1
spacing: '5dp'
Image:
source: 'atlas://electrum/gui/kivy/theming/light/star_big_inactive'
opacity: 0.7
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
ScrollView:
id: scrlv
ClickableLabel:
size_hint_y: None
text_size: self.width, None
height: self.height
text: s.flodata if s.flodata else (_('No FLO data') if root.is_pr else _('FLO data\n'))
on_release: Clock.schedule_once(lambda dt: app.flodata_dialog(s))
BoxLayout:
size_hint: 1, None
height: '48dp'