Send tab GUI change
This commit is contained in:
parent
ed1421da8e
commit
1e1caf602d
@ -207,6 +207,19 @@
|
||||
size: self.size
|
||||
pos: self.pos
|
||||
|
||||
<FLODataBlueBottom@GridLayout>
|
||||
item_height: dp(100)
|
||||
foreground_color: .843, .914, .972, 1
|
||||
cols: 1
|
||||
padding: '12dp', 0
|
||||
canvas.before:
|
||||
Color:
|
||||
rgba: 0.192, .498, 0.745, 1
|
||||
BorderImage:
|
||||
source: 'atlas://electrum/gui/kivy/theming/light/card_bottom'
|
||||
size: self.size
|
||||
pos: self.pos
|
||||
|
||||
|
||||
<AddressFilter@GridLayout>
|
||||
item_height: dp(42)
|
||||
@ -261,6 +274,26 @@
|
||||
size: self.size
|
||||
pos: self.pos
|
||||
|
||||
<FLODataButton@Button>:
|
||||
background_color: 1, .585, .878, 0
|
||||
halign: 'left'
|
||||
text_size: (self.width-10, None)
|
||||
size_hint: 0.5, None
|
||||
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
|
||||
canvas.before:
|
||||
Color:
|
||||
rgba: (0.9, .498, 0.745, 1) if self.state == 'down' else self.background_color
|
||||
Rectangle:
|
||||
size: self.size
|
||||
pos: self.pos
|
||||
|
||||
|
||||
<BlueButton@Button>:
|
||||
background_color: 1, .585, .878, 0
|
||||
halign: 'left'
|
||||
|
||||
BIN
electrum/gui/kivy/theming/light/flodata.png
Normal file
BIN
electrum/gui/kivy/theming/light/flodata.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@ -2,6 +2,8 @@ from kivy.app import App
|
||||
from kivy.factory import Factory
|
||||
from kivy.properties import ObjectProperty
|
||||
from kivy.lang import Builder
|
||||
from kivy.uix.textinput import TextInput
|
||||
from kivy.properties import NumericProperty
|
||||
|
||||
Builder.load_string('''
|
||||
<FLODataDialog@Popup>
|
||||
@ -13,11 +15,12 @@ Builder.load_string('''
|
||||
orientation: 'vertical'
|
||||
Widget:
|
||||
size_hint: 1, 0.4
|
||||
TextInput:
|
||||
LimitedInput:
|
||||
id:input
|
||||
padding: '5dp'
|
||||
size_hint: 1, 1
|
||||
height: '27dp'
|
||||
max_characters: 527
|
||||
pos_hint: {'center_y':.5}
|
||||
text:''
|
||||
multiline: True
|
||||
@ -46,6 +49,13 @@ Builder.load_string('''
|
||||
popup.dismiss()
|
||||
''')
|
||||
|
||||
class LimitedInput(TextInput):
|
||||
max_characters = NumericProperty(0)
|
||||
def insert_text(self, substring, from_undo=False):
|
||||
if len(self.text) > self.max_characters and self.max_characters > 0:
|
||||
substring = ""
|
||||
TextInput.insert_text(self, substring, from_undo)
|
||||
|
||||
class FLODataDialog(Factory.Popup):
|
||||
|
||||
def __init__(self, title, text, callback):
|
||||
|
||||
@ -48,16 +48,16 @@
|
||||
shorten: True
|
||||
text: root.date + ' ' + root.message
|
||||
CardLabel:
|
||||
color: .699, .699, .699, 1
|
||||
color: .799, .799, .799, 1
|
||||
font_size: '14sp'
|
||||
shorten: True
|
||||
text: root.flodata
|
||||
text: root.flodata if root.flodata else ''
|
||||
Widget
|
||||
|
||||
<HistoryRecycleView>:
|
||||
viewclass: 'HistoryItem'
|
||||
RecycleBoxLayout:
|
||||
default_size: None, dp(56)
|
||||
default_size: None, dp(70)
|
||||
default_size_hint: 1, None
|
||||
size_hint: 1, None
|
||||
height: self.minimum_height
|
||||
|
||||
@ -20,7 +20,7 @@ SendScreen:
|
||||
SendReceiveBlueBottom:
|
||||
id: blue_bottom
|
||||
size_hint: 1, None
|
||||
height: self.minimum_height
|
||||
height: self.minimum_height +5
|
||||
BoxLayout:
|
||||
size_hint: 1, None
|
||||
height: blue_bottom.item_height
|
||||
@ -39,24 +39,6 @@ SendScreen:
|
||||
CardSeparator:
|
||||
opacity: int(not root.is_pr)
|
||||
color: blue_bottom.foreground_color
|
||||
BoxLayout:
|
||||
id: flodata_selection
|
||||
size_hint: 1, None
|
||||
height: blue_bottom.item_height
|
||||
spacing: '5dp'
|
||||
Image:
|
||||
source: 'atlas://electrum/gui/kivy/theming/light/pen'
|
||||
size_hint: None, None
|
||||
size: '22dp', '22dp'
|
||||
pos_hint: {'center_y': .5}
|
||||
BlueButton:
|
||||
id: flodata
|
||||
text: s.flodata if s.flodata else (_('No FLO data') if root.is_pr else _('FLO data'))
|
||||
disabled: root.is_pr
|
||||
on_release: Clock.schedule_once(lambda dt: app.flodata_dialog(s))
|
||||
CardSeparator:
|
||||
opacity: int(not root.is_pr)
|
||||
color: blue_bottom.foreground_color
|
||||
BoxLayout:
|
||||
size_hint: 1, None
|
||||
height: blue_bottom.item_height
|
||||
@ -109,6 +91,25 @@ SendScreen:
|
||||
default_text: _('Fee')
|
||||
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
|
||||
on_release: Clock.schedule_once(lambda dt: app.flodata_dialog(s))
|
||||
BoxLayout:
|
||||
size_hint: 1, None
|
||||
height: '48dp'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user