Merge pull request #26 from jaicis/kivyfixes

kivy fixes part 7
This commit is contained in:
navjotcis 2020-01-10 19:39:44 +05:30 committed by GitHub
commit 5fc20221b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1081 additions and 1105 deletions

View File

@ -0,0 +1,24 @@
<AddressBook>:
name: 'addressbook'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:

View File

@ -0,0 +1,31 @@
<Allmails>:
name: 'allmails'
#FloatLayout:
# MDScrollViewRefreshLayout:
# id: refresh_layout
# refresh_callback: root.refresh_callback
# root_layout: root.set_root_layout()
# MDList:
# id: ml
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
GridLayout:
id: identi_tag
padding: [20, 20, 0, 5]
spacing: dp(5)
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:

View File

@ -0,0 +1,55 @@
<ArrowImg@Image>:
source: './images/down-arrow.png' if self.parent.is_open == True else './images/right-arrow.png'
size: 15, 15
x: self.parent.x + self.parent.width - self.width - 5
y: self.parent.y + self.parent.height/2 - self.height + 5
<SearchBar@BoxLayout>:
id: search_bar
size_hint_y: None
height: self.minimum_height
MDIconButton:
icon: 'magnify'
MDTextField:
id: search_field
hint_text: 'Search'
on_text: app.searchQuery(self)
<Loader@MDSpinner>:
id: spinner
size_hint: None, None
size: dp(46), dp(46)
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
active: False
<ComposerButton@BoxLayout>:
size_hint_y: None
height: dp(56)
spacing: '10dp'
pos_hint: {'center_x':0.45, 'center_y': .1}
Widget:
MDFloatingActionButton:
icon: 'plus'
opposite_colors: True
elevation_normal: 8
md_bg_color: [0.941, 0, 0,1]
on_press: app.root.ids.scr_mngr.current = 'create'
on_press: app.clear_composer()
<CopyTextBtn@Button>:
id: cpyButton
color: 0,0,0,1
background_color: (0,0,0,0)
center_x: self.parent.center_x * 2 - self.parent.parent.padding[0]/2
center_y: self.parent.center_y
on_press:app.root.ids.sc14.copy_composer_text(self)
Image:
source: './images/copy_text.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 20, 20

View File

@ -0,0 +1,101 @@
<DropDownWidget>:
ScrollView:
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height + 2 * self.parent.height/4
padding: dp(32)
spacing: 15
BoxLayout:
orientation: 'vertical'
MDTextField:
id: ti
hint_text: 'type or select sender address'
size_hint_y: None
height: 100
font_size: '13sp'
multiline: False
required: True
helper_text_mode: "on_error"
BoxLayout:
size_hint_y: None
height: dp(40)
Spinner:
id: btn
background_color: app.theme_cls.primary_dark
values: app.variable_1
on_text: root.auto_fill_fromaddr() if self.text != 'Select' else ''
option_cls: Factory.get("MySpinnerOption")
background_color: color_button if self.state == 'normal' else color_button_pressed
background_down: 'atlas://data/images/defaulttheme/spinner'
color: color_font
font_size: '12.5sp'
ArrowImg:
BoxLayout:
orientation: 'vertical'
txt_input: txt_input
rv: rv
size : (890, 60)
MyTextInput:
id: txt_input
size_hint_y: None
font_size: '13sp'
height: self.parent.height/2
hint_text: 'type, select or scan QR code for recipients address'
RV:
id: rv
MDTextField:
id: subject
hint_text: 'subject'
required: True
height: 100
font_size: '13sp'
size_hint_y: None
multiline: False
helper_text_mode: "on_error"
MDTextField:
id: body
multiline: True
hint_text: 'body'
size_hint_y: None
font_size: '13sp'
required: True
helper_text_mode: "on_error"
BoxLayout:
spacing:50
<MyTextInput>:
readonly: False
multiline: False
<SelectableLabel>:
# Draw a background to indicate selection
color: 0,0,0,1
canvas.before:
Color:
rgba: app.theme_cls.primary_dark if self.selected else (1, 1, 1, 0)
Rectangle:
pos: self.pos
size: self.size
<RV>:
canvas:
Color:
rgba: 0,0,0,.2
Line:
rectangle: self.x +1 , self.y, self.width - 2, self.height -2
bar_width: 10
scroll_type:['bars']
viewclass: 'SelectableLabel'
SelectableRecycleBoxLayout:
default_size: None, dp(20)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
multiselect: False

View File

@ -0,0 +1,20 @@
<Credits>:
name: 'credits'
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(200)
OneLineListItem:
text: "Available Credits"
BoxLayout:
AnchorLayout:
MDRaisedButton:
height: dp(40)
MDLabel:
font_style: 'H4'
text: root.available_credits
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'

View File

@ -0,0 +1,22 @@
<Draft>:
name: 'draft'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
GridLayout:
id: identi_tag
padding: [20, 20, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
ComposerButton:

View File

@ -0,0 +1,32 @@
<Inbox>:
name: 'inbox'
#transition: NoTransition()
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
#FloatLayout:
# MDScrollViewRefreshLayout:
# id: refresh_layout
# refresh_callback: root.refresh_callback
# root_layout: root.set_root_layout()
# MDList:
# id: ml
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:

View File

@ -0,0 +1,103 @@
<Login>:
name: 'login'
ScrollView:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(750)
padding: dp(10)
BoxLayout:
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "You may generate addresses by using either random numbers or by using a passphrase If you use a passphrase, the address is called a deterministic; address The Random Number option is selected by default but deterministic addresses have several \n pros and cons:\n"
halign: 'center'
color:app.theme_cls.primary_dark
BoxLayout:
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "If talk about pros You can recreate your addresses on any computer from memory, You need-not worry about backing up your keys.dat file as long as you can remember your passphrase and aside talk about cons You must remember (or write down) your You must remember the address version number and the stream number along with your passphrase If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you"
halign: 'center'
color:app.theme_cls.primary_dark
MDCheckbox:
id: grp_chkbox_1
group: 'test'
active: True
allow_no_selection: False
MDLabel:
font_style: 'Body2'
theme_text_color: 'Primary'
text: "use a random number generator to make an address"
halign: 'center'
size_hint_y: None
height: self.texture_size[1] + dp(4)
color: [0.941, 0, 0,1]
MDCheckbox:
id: grp_chkbox_1
group: 'test'
allow_no_selection: False
MDLabel:
font_style: 'Body2'
theme_text_color: 'Primary'
text: "use a pseudo number generator to make an address"
halign: 'center'
size_hint_y: None
color: [0.941, 0, 0,1]
height: self.texture_size[1] + dp(4)
BoxLayout:
AnchorLayout:
MDRaisedButton:
height: dp(40)
on_press: app.root.ids.scr_mngr.current = 'random'
on_press: app.root.ids.sc7.reset_address_label()
MDLabel:
font_style: 'H6'
text: 'proceed'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<Random>:
name: 'random'
ScrollView:
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height
padding: dp(20)
spacing: 100
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Random Addresses"
halign: 'center'
color:app.theme_cls.primary_dark
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Here you may generate as many addresses as you like, Indeed creating and abandoning addresses is encouraged"
halign: 'center'
color:app.theme_cls.primary_dark
MDTextField:
id: label
multiline: True
hint_text: "Label"
required: True
helper_text_mode: "on_error"
on_text: root.add_validation(self)
BoxLayout:
AnchorLayout:
MDRaisedButton:
height: dp(40)
on_release: root.generateaddress(app)
opposite_colors: True
MDLabel:
font_style: 'H6'
text: 'next'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'

View File

@ -0,0 +1,45 @@
<MailDetail>:
name: 'mailDetail'
ScrollView:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(500) + self.minimum_height
padding: dp(32)
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: root.subject
halign: 'left'
font_size: '20sp'
CopyTextBtn:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "From: " + root.from_addr
halign: 'left'
CopyTextBtn:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "To: " + root.to_addr
halign: 'left'
CopyTextBtn:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.status
halign: 'left'
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: root.message
halign: 'left'
bold: True
CopyTextBtn:
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(100) + self.minimum_height
Loader:

View File

@ -0,0 +1,24 @@
<MyAddress>:
name: 'myaddress'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: 'My Addresses'
font_style: 'Subtitle2'
FloatLayout:
MDScrollViewRefreshLayout:
id: refresh_layout
refresh_callback: root.refresh_callback
root_layout: root
MDList:
id: ml
Loader:
ComposerButton:

View File

@ -0,0 +1,87 @@
<NetworkStat>:
name: 'networkstat'
MDTabs:
id: tab_panel
tab_display_mode:'text'
Tab:
text: "Total connections"
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(200)
OneLineListItem:
text: "Total Connections"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .3
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_1
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
Tab:
text: 'Processes'
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(500)
OneLineListItem:
text: "person-to-person"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_2
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "Brodcast"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_3
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "publickeys"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_4
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "objects"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_5
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'

View File

@ -0,0 +1,144 @@
<Payment>:
name: 'payment'
ScrollView:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
padding: [dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/6 if app.window_size[0] <= 800 else app.window_size[0]/18), dp(10)]
spacing: 12
size_hint_y: None
height: self.minimum_height + dp(app.window_size[1]) if app.window_size[1] > app.window_size[0] else dp(app.window_size[0])
BoxLayout:
orientation: 'vertical'
padding: dp(5)
canvas.before:
Color:
rgba: app.theme_cls.primary_dark
Rectangle:
# self here refers to the widget i.e FloatLayout
pos: self.pos
size: self.size
MDLabel:
size_hint_y: None
font_style: 'H5'
theme_text_color: 'Primary'
text: 'Platinum'
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: 'We provide subscriptions for proof of work calculation for first month. '
halign: 'center'
color: 1,1,1,1
MDLabel:
id: free_pak
font_style: 'H5'
theme_text_color: 'Primary'
text: '€ 50.0'
halign: 'center'
color: 1,1,1,1
MDRaisedButton:
canvas:
Color:
rgb: (0.93, 0.93, 0.93)
Rectangle:
pos: self.pos
size: self.size
size: dp(app.window_size[0]) - 2*dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1) - 10 , 1
height: dp(40)
on_press: root.get_available_credits(self)
MDLabel:
font_style: 'H6'
text: 'Get Free Credits'
font_size: '13sp'
color: (0,0,0,1)
halign: 'center'
BoxLayout:
orientation: 'vertical'
padding: dp(5)
canvas.before:
Color:
rgba: app.theme_cls.primary_dark
Rectangle:
# self here refers to the widget i.e FloatLayout
pos: self.pos
size: self.size
MDLabel:
size_hint_y: None
font_style: 'H5'
theme_text_color: 'Primary'
text: 'Silver'
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: 'We provide for proof of work calculation for six month. '
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'H5'
theme_text_color: 'Primary'
text: '€ 100.0'
halign: 'center'
color: 1,1,1,1
MDRaisedButton:
canvas:
Color:
rgb: (0.93, 0.93, 0.93)
Rectangle:
pos: self.pos
size: self.size
size: dp(app.window_size[0]) - 2*dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1) - 10 , 1
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Get Monthly Credits'
font_size: '13sp'
color: (0,0,0,1)
halign: 'center'
BoxLayout:
orientation: 'vertical'
padding: dp(5)
canvas.before:
Color:
rgba: app.theme_cls.primary_dark
Rectangle:
# self here refers to the widget i.e FloatLayout
pos: self.pos
size: self.size
MDLabel:
size_hint_y: None
font_style: 'H5'
theme_text_color: 'Primary'
text: 'Gold'
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: 'We provide for proof of work calculation for 1years. '
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'H5'
theme_text_color: 'Primary'
text: '€ 500.0'
halign: 'center'
color: 1,1,1,1
MDRaisedButton:
canvas:
Color:
rgb: (0.93, 0.93, 0.93)
Rectangle:
pos: self.pos
size: self.size
size: dp(app.window_size[0]) - 2*dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1) - 10 , 1
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Get Yearly Credits'
font_size: '13sp'
color: (0,0,0,1)
halign: 'center'

View File

@ -0,0 +1,244 @@
<LoadingPopup>:
separator_color: 1, 1, 1, 1
background: "White.png"
Button:
id: btn
disabled: True
background_disabled_normal: "White.png"
Image:
source: './images/loader.zip'
anim_delay: 0
#mipmap: True
size: root.size
<GrashofPopup>:
id: popup
size_hint : (None,None)
height: 2*(label.height + address.height) + 10
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
title: 'add contact\'s'
background: './images/popup.jpeg'
title_size: sp(20)
title_color: 0.4, 0.3765, 0.3451, 1
auto_dismiss: False
separator_color: 0.3529, 0.3922, 0.102, 0.7
BoxLayout:
size_hint_y: 0.5
orientation: 'vertical'
spacing:dp(20)
id: popup_box
BoxLayout:
orientation: 'vertical'
MDTextField:
id: label
multiline: False
hint_text: "Label"
required: True
helper_text_mode: "on_error"
on_text: root.checkLabel_valid(self)
MDTextField:
id: address
hint_text: "Address"
required: True
helper_text_mode: "on_error"
on_text: root.checkAddress_valid(self)
BoxLayout:
spacing:5
orientation: 'horizontal'
MDRaisedButton:
id: save_addr
size_hint: 1.5, None
height: dp(40)
on_release:
root.savecontact()
MDLabel:
font_style: 'H6'
text: 'Save'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: root.close_pop()
MDLabel:
font_style: 'H6'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Scan QR code'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<AddbookDetailPopup>:
id: addbook_popup
size_hint : (None,None)
height: 4*(add_label.height)
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
background: './images/popup.jpeg'
separator_height: 0
auto_dismiss: False
BoxLayout:
size_hint_y: None
spacing:dp(70)
id: addbook_popup_box
orientation: 'vertical'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
spacing:dp(20)
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Label"
font_size: '17sp'
halign: 'left'
MDTextField:
id: add_label
font_style: 'Body1'
font_size: '15sp'
halign: 'left'
text: root.address_label
theme_text_color: 'Primary'
required: True
helper_text_mode: "on_error"
on_text: root.checkLabel_valid(self)
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Address"
font_size: '17sp'
halign: 'left'
MDLabel:
id: address
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.address
font_size: '15sp'
halign: 'left'
BoxLayout:
id: addbook_btn
spacing:5
orientation: 'horizontal'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
on_press: root.send_message_to()
MDLabel:
font_style: 'H6'
text: 'Send message to'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
font_size: '10sp'
on_press: root.update_addbook_label(root.address)
MDLabel:
font_style: 'H6'
text: 'Save'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: root.close_pop()
MDLabel:
font_style: 'H6'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<MyaddDetailPopup>:
id: myadd_popup
size_hint : (None,None)
height: 4.5*(myaddr_label.height+ my_add_btn.children[0].height)
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
background: './images/popup.jpeg'
auto_dismiss: False
separator_height: 0
BoxLayout:
id: myadd_popup_box
size_hint_y: None
spacing:dp(70)
orientation: 'vertical'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
spacing:dp(25)
MDLabel:
id: myaddr_label
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Label"
font_size: '17sp'
halign: 'left'
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.address_label
font_size: '15sp'
halign: 'left'
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Address"
font_size: '17sp'
halign: 'left'
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.address
font_size: '15sp'
halign: 'left'
BoxLayout:
id: my_add_btn
spacing:5
orientation: 'horizontal'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
on_press: root.send_message_from()
MDLabel:
font_style: 'H6'
text: 'Send message from'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: app.root.ids.scr_mngr.current = 'showqrcode'
on_press: app.root.ids.sc15.qrdisplay()
MDLabel:
font_style: 'H6'
text: 'Show QR code'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: root.close_pop()
MDLabel:
font_style: 'H6'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'

View File

@ -0,0 +1,24 @@
<Sent>:
name: 'sent'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:

View File

@ -0,0 +1,68 @@
<Setting>:
name: 'set'
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(500)
OneLineListItem:
text: "SERVER SETTINGS"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Server'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "DATA SETTINGS"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Import or export data'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "OTHER SETTINGS"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Restart background service'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
BoxLayout:
AnchorLayout:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "bitmessage is 11 seconds behind the network"
halign: 'center'
color: [0.941, 0, 0,1]
BoxLayout:
MDCheckbox:
id: chkbox
size_hint: None, None
size: dp(48), dp(64)
active: True
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "show settings (for advanced users only)"
halign: 'left'
color: app.theme_cls.primary_dark

View File

@ -0,0 +1,24 @@
<Trash>:
name: 'trash'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
GridLayout:
id: identi_tag
padding: [20, 20, 0, 5]
spacing: dp(5)
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:

View File

@ -222,64 +222,6 @@ NavigationLayout:
ContentNavigationDrawer:
id: content_drawer
<Inbox>:
name: 'inbox'
#transition: NoTransition()
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
#FloatLayout:
# MDScrollViewRefreshLayout:
# id: refresh_layout
# refresh_callback: root.refresh_callback
# root_layout: root.set_root_layout()
# MDList:
# id: ml
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:
<Sent>:
name: 'sent'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:
<Page>:
name: 'page'
Label:
@ -290,621 +232,18 @@ NavigationLayout:
name: 'create'
Loader:
<Trash>:
name: 'trash'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
GridLayout:
id: identi_tag
padding: [20, 20, 0, 5]
spacing: dp(5)
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:
<Login>:
name: 'login'
ScrollView:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(750)
padding: dp(10)
BoxLayout:
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "You may generate addresses by using either random numbers or by using a passphrase If you use a passphrase, the address is called a deterministic; address The Random Number option is selected by default but deterministic addresses have several \n pros and cons:\n"
halign: 'center'
color:app.theme_cls.primary_dark
BoxLayout:
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "If talk about pros You can recreate your addresses on any computer from memory, You need-not worry about backing up your keys.dat file as long as you can remember your passphrase and aside talk about cons You must remember (or write down) your You must remember the address version number and the stream number along with your passphrase If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you"
halign: 'center'
color:app.theme_cls.primary_dark
MDCheckbox:
id: grp_chkbox_1
group: 'test'
active: True
allow_no_selection: False
MDLabel:
font_style: 'Body2'
theme_text_color: 'Primary'
text: "use a random number generator to make an address"
halign: 'center'
size_hint_y: None
height: self.texture_size[1] + dp(4)
color: [0.941, 0, 0,1]
MDCheckbox:
id: grp_chkbox_1
group: 'test'
allow_no_selection: False
MDLabel:
font_style: 'Body2'
theme_text_color: 'Primary'
text: "use a pseudo number generator to make an address"
halign: 'center'
size_hint_y: None
color: [0.941, 0, 0,1]
height: self.texture_size[1] + dp(4)
BoxLayout:
AnchorLayout:
MDRaisedButton:
height: dp(40)
on_press: app.root.ids.scr_mngr.current = 'random'
on_press: app.root.ids.sc7.reset_address_label()
MDLabel:
font_style: 'H6'
text: 'proceed'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<Random>:
name: 'random'
ScrollView:
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height
padding: dp(20)
spacing: 100
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Random Addresses"
halign: 'center'
color:app.theme_cls.primary_dark
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Here you may generate as many addresses as you like, Indeed creating and abandoning addresses is encouraged"
halign: 'center'
color:app.theme_cls.primary_dark
MDTextField:
id: label
multiline: True
hint_text: "Label"
required: True
helper_text_mode: "on_error"
on_text: root.add_validation(self)
BoxLayout:
AnchorLayout:
MDRaisedButton:
height: dp(40)
on_release: root.generateaddress(app)
opposite_colors: True
MDLabel:
font_style: 'H6'
text: 'next'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<Spam>:
name: 'spam'
Label:
text:"I am in Spam"
color: 0,0,0,1
<Setting>:
name: 'set'
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(500)
OneLineListItem:
text: "SERVER SETTINGS"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Server'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "DATA SETTINGS"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Import or export data'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "OTHER SETTINGS"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Restart background service'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
BoxLayout:
AnchorLayout:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "bitmessage is 11 seconds behind the network"
halign: 'center'
color: [0.941, 0, 0,1]
BoxLayout:
MDCheckbox:
id: chkbox
size_hint: None, None
size: dp(48), dp(64)
active: True
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "show settings (for advanced users only)"
halign: 'left'
color: app.theme_cls.primary_dark
<MyAddress>:
name: 'myaddress'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: 'My Addresses'
font_style: 'Subtitle2'
FloatLayout:
MDScrollViewRefreshLayout:
id: refresh_layout
refresh_callback: root.refresh_callback
root_layout: root
MDList:
id: ml
Loader:
ComposerButton:
<AddressBook>:
name: 'addressbook'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
SearchBar:
GridLayout:
id: identi_tag
padding: [20, 0, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:
<Payment>:
name: 'payment'
ScrollView:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
padding: [dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/6 if app.window_size[0] <= 800 else app.window_size[0]/18), dp(10)]
spacing: 12
size_hint_y: None
height: self.minimum_height + dp(app.window_size[1]) if app.window_size[1] > app.window_size[0] else dp(app.window_size[0])
BoxLayout:
orientation: 'vertical'
padding: dp(5)
canvas.before:
Color:
rgba: app.theme_cls.primary_dark
Rectangle:
# self here refers to the widget i.e FloatLayout
pos: self.pos
size: self.size
MDLabel:
size_hint_y: None
font_style: 'H5'
theme_text_color: 'Primary'
text: 'Platinum'
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: 'We provide subscriptions for proof of work calculation for first month. '
halign: 'center'
color: 1,1,1,1
MDLabel:
id: free_pak
font_style: 'H5'
theme_text_color: 'Primary'
text: '€ 50.0'
halign: 'center'
color: 1,1,1,1
MDRaisedButton:
canvas:
Color:
rgb: (0.93, 0.93, 0.93)
Rectangle:
pos: self.pos
size: self.size
size: dp(app.window_size[0]) - 2*dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1) - 10 , 1
height: dp(40)
on_press: root.get_available_credits(self)
MDLabel:
font_style: 'H6'
text: 'Get Free Credits'
font_size: '13sp'
color: (0,0,0,1)
halign: 'center'
BoxLayout:
orientation: 'vertical'
padding: dp(5)
canvas.before:
Color:
rgba: app.theme_cls.primary_dark
Rectangle:
# self here refers to the widget i.e FloatLayout
pos: self.pos
size: self.size
MDLabel:
size_hint_y: None
font_style: 'H5'
theme_text_color: 'Primary'
text: 'Silver'
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: 'We provide for proof of work calculation for six month. '
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'H5'
theme_text_color: 'Primary'
text: '€ 100.0'
halign: 'center'
color: 1,1,1,1
MDRaisedButton:
canvas:
Color:
rgb: (0.93, 0.93, 0.93)
Rectangle:
pos: self.pos
size: self.size
size: dp(app.window_size[0]) - 2*dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1) - 10 , 1
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Get Monthly Credits'
font_size: '13sp'
color: (0,0,0,1)
halign: 'center'
BoxLayout:
orientation: 'vertical'
padding: dp(5)
canvas.before:
Color:
rgba: app.theme_cls.primary_dark
Rectangle:
# self here refers to the widget i.e FloatLayout
pos: self.pos
size: self.size
MDLabel:
size_hint_y: None
font_style: 'H5'
theme_text_color: 'Primary'
text: 'Gold'
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: 'We provide for proof of work calculation for 1years. '
halign: 'center'
color: 1,1,1,1
MDLabel:
font_style: 'H5'
theme_text_color: 'Primary'
text: '€ 500.0'
halign: 'center'
color: 1,1,1,1
MDRaisedButton:
canvas:
Color:
rgb: (0.93, 0.93, 0.93)
Rectangle:
pos: self.pos
size: self.size
size: dp(app.window_size[0]) - 2*dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1) - 10 , 1
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Get Yearly Credits'
font_size: '13sp'
color: (0,0,0,1)
halign: 'center'
<NetworkStat>:
name: 'networkstat'
MDTabs:
id: tab_panel
tab_display_mode:'text'
Tab:
text: "Total connections"
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(200)
OneLineListItem:
text: "Total Connections"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .6, .3
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_1
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
Tab:
text: 'Processes'
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(500)
OneLineListItem:
text: "person-to-person"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_2
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "Brodcast"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_3
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "publickeys"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_4
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "objects"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .55
height: dp(40)
MDLabel:
font_style: 'H6'
text: root.text_variable_5
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<MailDetail>:
name: 'mailDetail'
ScrollView:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(500) + self.minimum_height
padding: dp(32)
MDLabel:
font_style: 'Subtitle1'
theme_text_color: 'Primary'
text: root.subject
halign: 'left'
font_size: '20sp'
CopyTextBtn:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "From: " + root.from_addr
halign: 'left'
CopyTextBtn:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "To: " + root.to_addr
halign: 'left'
CopyTextBtn:
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.status
halign: 'left'
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: root.message
halign: 'left'
bold: True
CopyTextBtn:
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(100) + self.minimum_height
Loader:
<ShowQRCode>:
name: 'showqrcode'
BoxLayout:
orientation: 'vertical'
id: qr
<Draft>:
name: 'draft'
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
GridLayout:
id: identi_tag
padding: [20, 20, 0, 5]
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
ComposerButton:
<Allmails>:
name: 'allmails'
#FloatLayout:
# MDScrollViewRefreshLayout:
# id: refresh_layout
# refresh_callback: root.refresh_callback
# root_layout: root.set_root_layout()
# MDList:
# id: ml
BoxLayout:
orientation: 'vertical'
spacing: dp(5)
GridLayout:
id: identi_tag
padding: [20, 20, 0, 5]
spacing: dp(5)
cols: 1
size_hint_y: None
height: self.minimum_height
MDLabel:
text: ''
font_style: 'Subtitle2'
BoxLayout:
orientation:'vertical'
ScrollView:
id: scroll_y
do_scroll_x: False
MDList:
id: ml
Loader:
ComposerButton:
<Credits>:
name: 'credits'
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(200)
OneLineListItem:
text: "Available Credits"
BoxLayout:
AnchorLayout:
MDRaisedButton:
height: dp(40)
MDLabel:
font_style: 'H4'
text: root.available_credits
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<Starred>:
name: 'starred'
Label:
@ -920,408 +259,3 @@ NavigationLayout:
color: 0,0,0,1
color: 0,0,0,1
<ArrowImg@Image>:
source: './images/down-arrow.png' if self.parent.is_open == True else './images/right-arrow.png'
size: 15, 15
x: self.parent.x + self.parent.width - self.width - 5
y: self.parent.y + self.parent.height/2 - self.height + 5
<SearchBar@BoxLayout>:
id: search_bar
size_hint_y: None
height: self.minimum_height
MDIconButton:
icon: 'magnify'
MDTextField:
id: search_field
hint_text: 'Search'
on_text: app.searchQuery(self)
<Loader@MDSpinner>:
id: spinner
size_hint: None, None
size: dp(46), dp(46)
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
active: False
<ComposerButton@BoxLayout>:
size_hint_y: None
height: dp(56)
spacing: '10dp'
pos_hint: {'center_x':0.45, 'center_y': .1}
Widget:
MDFloatingActionButton:
icon: 'plus'
opposite_colors: True
elevation_normal: 8
md_bg_color: [0.941, 0, 0,1]
on_press: app.root.ids.scr_mngr.current = 'create'
on_press: app.clear_composer()
<DropDownWidget>:
ScrollView:
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height + 2 * self.parent.height/4
padding: dp(32)
spacing: 15
BoxLayout:
orientation: 'vertical'
MDTextField:
id: ti
hint_text: 'type or select sender address'
size_hint_y: None
height: 100
font_size: '13sp'
multiline: False
required: True
helper_text_mode: "on_error"
BoxLayout:
size_hint_y: None
height: dp(40)
Spinner:
id: btn
background_color: app.theme_cls.primary_dark
values: app.variable_1
on_text: root.auto_fill_fromaddr() if self.text != 'Select' else ''
option_cls: Factory.get("MySpinnerOption")
background_color: color_button if self.state == 'normal' else color_button_pressed
background_down: 'atlas://data/images/defaulttheme/spinner'
color: color_font
font_size: '12.5sp'
ArrowImg:
BoxLayout:
orientation: 'vertical'
txt_input: txt_input
rv: rv
size : (890, 60)
MyTextInput:
id: txt_input
size_hint_y: None
font_size: '13sp'
height: self.parent.height/2
hint_text: 'type, select or scan QR code for recipients address'
RV:
id: rv
MDTextField:
id: subject
hint_text: 'subject'
required: True
height: 100
font_size: '13sp'
size_hint_y: None
multiline: False
helper_text_mode: "on_error"
MDTextField:
id: body
multiline: True
hint_text: 'body'
size_hint_y: None
font_size: '13sp'
required: True
helper_text_mode: "on_error"
BoxLayout:
spacing:50
<MyTextInput>:
readonly: False
multiline: False
<SelectableLabel>:
# Draw a background to indicate selection
color: 0,0,0,1
canvas.before:
Color:
rgba: app.theme_cls.primary_dark if self.selected else (1, 1, 1, 0)
Rectangle:
pos: self.pos
size: self.size
<RV>:
canvas:
Color:
rgba: 0,0,0,.2
Line:
rectangle: self.x +1 , self.y, self.width - 2, self.height -2
bar_width: 10
scroll_type:['bars']
viewclass: 'SelectableLabel'
SelectableRecycleBoxLayout:
default_size: None, dp(20)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
multiselect: False
<LoadingPopup>:
separator_color: 1, 1, 1, 1
background: "White.png"
Button:
id: btn
disabled: True
background_disabled_normal: "White.png"
Image:
source: './images/loader.zip'
anim_delay: 0
#mipmap: True
size: root.size
<CopyTextBtn@Button>:
id: cpyButton
color: 0,0,0,1
background_color: (0,0,0,0)
center_x: self.parent.center_x * 2 - self.parent.parent.padding[0]/2
center_y: self.parent.center_y
on_press:app.root.ids.sc14.copy_composer_text(self)
Image:
source: './images/copy_text.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 20, 20
<GrashofPopup>:
id: popup
size_hint : (None,None)
height: 2*(label.height + address.height) + 10
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
title: 'add contact\'s'
background: './images/popup.jpeg'
title_size: sp(20)
title_color: 0.4, 0.3765, 0.3451, 1
auto_dismiss: False
separator_color: 0.3529, 0.3922, 0.102, 0.7
BoxLayout:
size_hint_y: 0.5
orientation: 'vertical'
spacing:dp(20)
id: popup_box
BoxLayout:
orientation: 'vertical'
MDTextField:
id: label
multiline: False
hint_text: "Label"
required: True
helper_text_mode: "on_error"
on_text: root.checkLabel_valid(self)
MDTextField:
id: address
hint_text: "Address"
required: True
helper_text_mode: "on_error"
on_text: root.checkAddress_valid(self)
BoxLayout:
spacing:5
orientation: 'horizontal'
MDRaisedButton:
id: save_addr
size_hint: 1.5, None
height: dp(40)
on_release:
root.savecontact()
MDLabel:
font_style: 'H6'
text: 'Save'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: root.close_pop()
MDLabel:
font_style: 'H6'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
MDLabel:
font_style: 'H6'
text: 'Scan QR code'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<AddbookDetailPopup>:
id: addbook_popup
size_hint : (None,None)
height: 4*(add_label.height)
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
background: './images/popup.jpeg'
separator_height: 0
auto_dismiss: False
BoxLayout:
size_hint_y: None
spacing:dp(70)
id: addbook_popup_box
orientation: 'vertical'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
spacing:dp(20)
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Label"
font_size: '17sp'
halign: 'left'
MDTextField:
id: add_label
font_style: 'Body1'
font_size: '15sp'
halign: 'left'
text: root.address_label
theme_text_color: 'Primary'
required: True
helper_text_mode: "on_error"
on_text: root.checkLabel_valid(self)
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Address"
font_size: '17sp'
halign: 'left'
MDLabel:
id: address
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.address
font_size: '15sp'
halign: 'left'
BoxLayout:
id: addbook_btn
spacing:5
orientation: 'horizontal'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
on_press: root.send_message_to()
MDLabel:
font_style: 'H6'
text: 'Send message to'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
font_size: '10sp'
on_press: root.update_addbook_label(root.address)
MDLabel:
font_style: 'H6'
text: 'Save'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: root.close_pop()
MDLabel:
font_style: 'H6'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<MyaddDetailPopup>:
id: myadd_popup
size_hint : (None,None)
height: 4.5*(myaddr_label.height+ my_add_btn.children[0].height)
width :app.window_size[0] - (app.window_size[0]/10 if app.app_platform == 'android' else app.window_size[0]/4)
background: './images/popup.jpeg'
auto_dismiss: False
separator_height: 0
BoxLayout:
id: myadd_popup_box
size_hint_y: None
spacing:dp(70)
orientation: 'vertical'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
spacing:dp(25)
MDLabel:
id: myaddr_label
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Label"
font_size: '17sp'
halign: 'left'
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.address_label
font_size: '15sp'
halign: 'left'
MDLabel:
font_style: 'Subtitle2'
theme_text_color: 'Primary'
text: "Address"
font_size: '17sp'
halign: 'left'
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: root.address
font_size: '15sp'
halign: 'left'
BoxLayout:
id: my_add_btn
spacing:5
orientation: 'horizontal'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
on_press: root.send_message_from()
MDLabel:
font_style: 'H6'
text: 'Send message from'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: app.root.ids.scr_mngr.current = 'showqrcode'
on_press: app.root.ids.sc15.qrdisplay()
MDLabel:
font_style: 'H6'
text: 'Show QR code'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_press: root.dismiss()
on_press: root.close_pop()
MDLabel:
font_style: 'H6'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'

View File

@ -65,6 +65,12 @@ import state
from addresses import decodeAddress
KVFILES = ['settings', 'popup', 'allmails', 'draft',
'maildetail', 'common_widgets', 'addressbook',
'myaddress', 'composer', 'payment', 'sent',
'network', 'login', 'credits', 'trash', 'inbox']
def toast(text):
"""Method will display the toast message"""
# pylint: disable=redefined-outer-name
@ -842,8 +848,8 @@ class Random(Screen):
nonceTrialsPerByte,
payloadLengthExtraBytes))
self.ids.label.text = ''
self.parent.parent.children[1].opacity = 1
self.parent.parent.children[1].disabled = False
self.parent.parent.ids.toolbar.opacity = 1
self.parent.parent.ids.toolbar.disabled = False
state.kivyapp.loadMyAddressScreen(True)
self.manager.current = 'myaddress'
Clock.schedule_once(self.address_created_callback, 6)
@ -1290,34 +1296,19 @@ class NavigateApp(MDApp):
title = "PyBitmessage"
imgstatus = False
count = 0
menu_items = [
{'viewclass': 'MDMenuItem',
'text': 'Example item'},
{'viewclass': 'MDMenuItem',
'text': 'Example item'},
{'viewclass': 'MDMenuItem',
'text': 'Example item'},
{'viewclass': 'MDMenuItem',
'text': 'Example item'},
{'viewclass': 'MDMenuItem',
'text': 'Example item'},
{'viewclass': 'MDMenuItem',
'text': 'Example item'},
{'viewclass': 'MDMenuItem',
'text': 'Example item'},
]
def build(self):
"""Method builds the widget"""
print(os.path.join(os.path.dirname(__file__), 'main.kv'))
main_widget = Builder.load_file(
os.path.join(os.path.dirname(__file__), 'main.kv'))
for kv_file in KVFILES:
Builder.load_file(
os.path.join(os.path.dirname(__file__),f"kv/{kv_file}.kv"))
self.obj_1 = AddressBook()
kivysignalthread = UIkivySignaler()
kivysignalthread.daemon = True
kivysignalthread.start()
Window.bind(on_keyboard=self.on_key)
return main_widget
return Builder.load_file(
os.path.join(os.path.dirname(__file__), 'main.kv'))
def run(self):
"""Running the widgets"""
@ -1655,10 +1646,11 @@ class NavigateApp(MDApp):
def closeSearchScreen(self):
"""Function for close search screen"""
self.set_common_header()
address_label = self.current_address_label(
BMConfigParser().get(
state.association, 'label'), state.association)
self.root.ids.toolbar.title = address_label
if state.association:
address_label = self.current_address_label(
BMConfigParser().get(
state.association, 'label'), state.association)
self.root.ids.toolbar.title = address_label
state.searcing_text = ''
self.refreshScreen()
state.in_search_mode = False
@ -2144,11 +2136,13 @@ class ShowQRCode(Screen):
def qrdisplay(self):
"""Method used for showing QR Code"""
# self.manager.parent.parent.parent.ids.search_bar.clear_widgets()
self.ids.qr.clear_widgets()
from kivy.garden.qrcode import QRCodeWidget
self.ids.qr.add_widget(QRCodeWidget(
data=self.manager.get_parent_window().children[0].address))
try:
address = self.manager.get_parent_window().children[0].address
except Exception as e:
address = self.manager.get_parent_window().children[1].address
self.ids.qr.add_widget(QRCodeWidget(data=address))
toast('Show QR code')
@ -2283,19 +2277,19 @@ class Draft(Screen):
def delete_draft(self, data_index, instance, *args):
"""Delete draft message permanently"""
sqlExecute("DELETE FROM sent WHERE ackdata = ?;", data_index)
try:
msg_count_objs = (
self.parent.parent.parent.parent.parent.children[
2].children[0].ids)
except Exception:
msg_count_objs = (
self.parent.parent.parent.parent.parent.parent.children[
2].children[0].ids)
# try:
# msg_count_objs = (
# self.parent.parent.parent.parent.parent.children[
# 2].children[0].ids)
# except Exception:
# msg_count_objs = (
# self.parent.parent.parent.parent.parent.parent.children[
# 2].children[0].ids)
# msg_count_objs = self.parent.parent.parent.parent.parent.children[
# 2].children[0].ids
if int(state.draft_count) > 0:
msg_count_objs.draft_cnt.badge_text = str(
int(state.draft_count) - 1)
# msg_count_objs.draft_cnt.badge_text = str(
# int(state.draft_count) - 1)
state.draft_count = str(int(state.draft_count) - 1)
if int(state.draft_count) <= 0:
self.ids.identi_tag.children[0].text = ''