This repository has been archived on 2024-12-09. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-09/src/bitmessagekivy/main.kv

1028 lines
35 KiB
Plaintext
Raw Normal View History

#:import Toolbar kivymd.toolbar.Toolbar
#:import ThemeManager kivymd.theming.ThemeManager
#:import MDNavigationDrawer kivymd.navigationdrawer.MDNavigationDrawer
#:import NavigationLayout kivymd.navigationdrawer.NavigationLayout
#:import NavigationDrawerDivider kivymd.navigationdrawer.NavigationDrawerDivider
#:import NavigationDrawerToolbar kivymd.navigationdrawer.NavigationDrawerToolbar
#:import NavigationDrawerSubheader kivymd.navigationdrawer.NavigationDrawerSubheader
#:import MDCheckbox kivymd.selectioncontrols.MDCheckbox
#:import MDSwitch kivymd.selectioncontrols.MDSwitch
#:import MDList kivymd.list.MDList
#:import OneLineListItem kivymd.list.OneLineListItem
#:import TwoLineListItem kivymd.list.TwoLineListItem
#:import ThreeLineListItem kivymd.list.ThreeLineListItem
#:import OneLineAvatarListItem kivymd.list.OneLineAvatarListItem
#:import OneLineIconListItem kivymd.list.OneLineIconListItem
#:import OneLineAvatarIconListItem kivymd.list.OneLineAvatarIconListItem
#:import MDTextField kivymd.textfields.MDTextField
#:import MDSpinner kivymd.spinner.MDSpinner
#:import MDCard kivymd.card.MDCard
#:import MDSeparator kivymd.card.MDSeparator
#:import MDDropdownMenu kivymd.menu.MDDropdownMenu
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import colors kivymd.color_definitions.colors
#:import SmartTile kivymd.grid.SmartTile
#:import MDSlider kivymd.slider.MDSlider
#:import MDTabbedPanel kivymd.tabs.MDTabbedPanel
#:import MDTab kivymd.tabs.MDTab
#:import MDProgressBar kivymd.progressbar.MDProgressBar
#:import MDAccordion kivymd.accordion.MDAccordion
#:import MDAccordionItem kivymd.accordion.MDAccordionItem
#:import MDAccordionSubItem kivymd.accordion.MDAccordionSubItem
#:import MDThemePicker kivymd.theme_picker.MDThemePicker
#:import MDBottomNavigation kivymd.tabs.MDBottomNavigation
#:import MDBottomNavigationItem kivymd.tabs.MDBottomNavigationItem
#:import MDFloatingActionButton kivymd.button.MDFloatingActionButton
2019-06-06 15:48:20 +02:00
#:import Factory kivy.factory.Factory
#:import MDTextButton kivymd.button.MDTextButton
#:import FadeTransition kivy.uix.screenmanager.FadeTransition
#:import MDScrollViewRefreshLayout kivymd.refreshlayout.MDScrollViewRefreshLayout
#:set color_button (0.784, 0.443, 0.216, 1) # brown
#:set color_button_pressed (0.659, 0.522, 0.431, 1) # darker brown
#:set color_font (0.957, 0.890, 0.843, 1) # off white
<MyNavigationDrawerIconButton@NavigationDrawerIconButton>:
icon: 'checkbox-blank-circle'
2019-06-06 15:48:20 +02:00
<MySpinnerOption@SpinnerOption>:
font_size: '12.5sp'
background_color: color_button if self.state == 'down' else color_button_pressed
background_down: 'atlas://data/images/defaulttheme/button'
color: color_font
2019-06-06 15:48:20 +02:00
<ContentNavigationDrawer@Navigatorss>:
drawer_logo: './images/drawer_logo1.png'
NavigationDrawerDivider:
NavigationDrawerTwoLineListItem:
text: "Accounts"
NavigationDrawerIconButton:
CustomSpinner:
pos_hint:{"x":0,"y":.25}
id: btn
2019-06-06 15:48:20 +02:00
option_cls: Factory.get("MySpinnerOption")
font_size: '12.5sp'
text: app.getDefaultAccData()
background_color: color_button if self.state == 'normal' else color_button_pressed
background_down: 'atlas://data/images/defaulttheme/spinner'
color: color_font
values: app.variable_1
on_text:app.getCurrentAccountData(self.text)
ArrowImg:
NavigationDrawerIconButton:
id: inbox_cnt
icon: 'email-open'
text: "Inbox"
on_release: app.root.ids.scr_mngr.current = 'inbox'
badge_text: app.mail_count(self.text)
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
id: send_cnt
icon: 'send'
text: "Sent"
on_release: app.root.ids.scr_mngr.current = 'sent'
badge_text: app.mail_count(self.text)
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
id: draft_cnt
icon: 'message-draw'
text: "Draft"
on_release: app.root.ids.scr_mngr.current = 'draft'
badge_text: app.mail_count(self.text)
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
text: "Starred"
icon:'star'
on_release: app.root.ids.scr_mngr.current = 'inbox'
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
icon: 'archive'
text: "Archieve"
on_release: app.root.ids.scr_mngr.current = 'trash'
badge_text: "9+"
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
icon: 'email-open-outline'
text: "Spam"
on_release: app.root.ids.scr_mngr.current = 'inbox'
badge_text: "8+"
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
id: trash_cnt
icon: 'delete'
text: "Trash"
on_release: app.root.ids.scr_mngr.current = 'trash'
badge_text: app.mail_count(self.text)
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
id: allmail_cnt
text: "All Mails"
icon:'contact-mail'
on_release: app.root.ids.scr_mngr.current = 'allmails'
badge_text: app.mail_count(self.text)
on_press: app.check_search_screen(self)
NavigationDrawerDivider:
NavigationDrawerSubheader:
text: "All labels"
NavigationDrawerIconButton:
text: "Address Book"
icon:'book-multiple'
on_release: app.root.ids.scr_mngr.current = 'addressbook'
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
text: "Settings"
icon:'settings'
on_release: app.root.ids.scr_mngr.current = 'set'
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
text: "Subscriptions/Payment"
icon:'wallet'
on_release: app.root.ids.scr_mngr.current = 'payment'
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
text: "new address"
icon:'account-plus'
on_release: app.root.ids.scr_mngr.current = 'login'
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
text: "Network Status"
icon:'server-network'
on_release: app.root.ids.scr_mngr.current = 'networkstat'
on_press: app.check_search_screen(self)
NavigationDrawerIconButton:
text: "My Addresses"
icon:'account-multiple'
on_release: app.root.ids.scr_mngr.current = 'myaddress'
on_press: app.check_search_screen(self)
NavigationLayout:
id: nav_layout
ContentNavigationDrawer:
id: nav_drawer
BoxLayout:
id: box_layout
orientation: 'vertical'
Toolbar:
id: toolbar
title: app.current_address_label()
opacity: 1 if app.addressexist() else 0
disabled: False if app.addressexist() else True
md_bg_color: app.theme_cls.primary_color
background_palette: 'Primary'
background_hue: '500'
left_action_items: [['menu', lambda x: app.root.toggle_nav_drawer()]]
Button:
id: myButton
size_hint_y: 0.35
size_hint_x: 0.2
pos_hint: {'x': .1, 'y': 0.3}
color: 0,0,0,1
background_color: (0,0,0,0)
on_press:app.addingtoaddressbook()
Image:
source: './images/addressbookadd.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 55, 55
2019-08-05 09:41:56 +02:00
BoxLayout:
id: search_bar
size_hint_y: None
height: self.minimum_height
MDIconButton:
icon: 'magnify'
MDTextField:
id: search_field
hint_text: 'Search'
2019-08-05 09:41:56 +02:00
on_text: app.searchQuery(self)
ScreenManager:
id: scr_mngr
Inbox:
id:sc1
Page:
id:sc2
Create:
id:sc3
Sent:
id:sc4
Trash:
id:sc5
Login:
id:sc6
Random:
id:sc7
AddressSuccessful:
id:sc8
Setting:
id:sc9
MyAddress:
id:sc10
AddressBook:
id:sc11
Payment:
id:sc12
NetworkStat:
id:sc13
2019-06-06 15:48:20 +02:00
MailDetail:
id:sc14
ShowQRCode:
id:sc15
Draft:
id:sc16
Allmails:
id:sc17
<Inbox>:
name: 'inbox'
FloatLayout:
MDScrollViewRefreshLayout:
id: refresh_layout
refresh_callback: root.refresh_callback
root_layout: root
MDList:
id: ml
2019-08-06 18:13:34 +02:00
ComposerButton:
<Sent>:
name: 'sent'
ScrollView:
do_scroll_x: False
MDList:
id: ml
2019-06-06 15:48:20 +02:00
ComposerButton:
<Trash>:
name: 'trash'
ScrollView:
do_scroll_x: False
MDList:
id: ml
2019-06-06 15:48:20 +02:00
ComposerButton:
<Draft>:
name: 'draft'
ScrollView:
do_scroll_x: False
MDList:
id: ml
ComposerButton:
<Allmails>:
name: 'allmails'
FloatLayout:
MDScrollViewRefreshLayout:
id: refresh_layout
refresh_callback: root.refresh_callback
root_layout: root
MDList:
id: ml
ComposerButton:
<Test>:
name: 'test'
Label:
text:"I am in test"
color: 0,0,0,1
<Page>:
name: 'page'
Label:
text:"I am on page"
color: 0,0,0,1
<Create>:
name: 'create'
<DropDownWidget>:
ScrollView:
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(500)
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)
CustomSpinner:
background_color: app.theme_cls.primary_dark
id: btn
values: app.variable_1
on_text: root.auto_fill_fromaddr() if self.text != 'Select' else ''
2019-06-06 15:48:20 +02:00
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
2019-06-06 15:48:20 +02:00
font_size: '12.5sp'
ArrowImg:
BoxLayout:
orientation: 'vertical'
txt_input: txt_input
rv: rv
size : (890, 60)
size_hint: 1,1
MyTextInput:
id: txt_input
size_hint_y: None
font_size: '13sp'
height: 70
hint_text: 'type or search recipients address starting with BM-'
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
AnchorLayout:
MDRaisedButton:
size_hint: 1, None
height: dp(40)
on_press: root.send(app)
MDLabel:
font_style: 'Title'
text: 'send'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
AnchorLayout:
MDRaisedButton:
size_hint: 1, None
height: dp(40)
on_press: root.reset_composer()
MDLabel:
font_style: 'Title'
text: 'reset'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<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
<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: 'Body1'
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'
bold: True
color:app.theme_cls.primary_dark
BoxLayout:
MDLabel:
font_style: 'Caption'
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'
bold: True
color:app.theme_cls.primary_dark
MDCheckbox:
id: grp_chkbox_1
group: 'test'
active: True
allow_no_selection: False
MDLabel:
font_style: 'Caption'
theme_text_color: 'Primary'
text: "use a random number generator to make an address"
halign: 'center'
size_hint_y: None
bold: True
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: 'Caption'
theme_text_color: 'Primary'
text: "use a pseudo number generator to make an address"
halign: 'center'
size_hint_y: None
bold: True
color: [0.941, 0, 0,1]
height: self.texture_size[1] + dp(4)
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .5, .35
height: dp(40)
on_press: app.root.ids.scr_mngr.current = 'random'
MDLabel:
font_style: 'Title'
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: 'Body1'
theme_text_color: 'Primary'
text: "Random Addresses"
halign: 'center'
bold: True
color:app.theme_cls.primary_dark
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "Here you may generate as many addresses as you like, Indeed creating and abandoning addresses is encouraged"
halign: 'center'
bold: True
color:app.theme_cls.primary_dark
MDTextField:
id: label
multiline: True
hint_text: "Label"
required: True
helper_text_mode: "on_error"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .5, None
height: dp(40)
on_release: root.generateaddress(app)
opposite_colors: True
MDLabel:
font_style: 'Title'
text: 'next'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<AddressSuccessful>:
name: 'add_sucess'
Label:
text: 'Successfully created a new bit address'
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: 'Title'
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: 'Title'
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: 'Title'
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'
bold: True
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'
bold: True
color: app.theme_cls.primary_dark
<MyAddress>:
name: 'myaddress'
FloatLayout:
MDScrollViewRefreshLayout:
id: refresh_layout
refresh_callback: root.refresh_callback
root_layout: root
MDList:
id: ml
2019-06-06 15:48:20 +02:00
ComposerButton:
<AddressBook>:
name: 'addressbook'
BoxLayout:
orientation:'vertical'
ScrollView:
do_scroll_x: False
MDList:
id: ml
2019-06-06 15:48:20 +02:00
ComposerButton:
<Payment>:
name: 'payment'
<GrashofPopup>:
id: popup
title: 'add contact\'s'
background: './images/popup.jpeg'
title_size: sp(20)
title_color: 0.4, 0.3765, 0.3451, 1
size_hint: 1, 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"
MDTextField:
id: address
hint_text: "Address"
required: True
helper_text_mode: "on_error"
BoxLayout:
spacing:5
orientation: 'horizontal'
MDRaisedButton:
size_hint: 1.5, None
height: dp(40)
on_release:
root.savecontact()
MDLabel:
font_style: 'Title'
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: 'Title'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
MDLabel:
font_style: 'Title'
text: 'Scan QR code'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<NetworkStat>:
name: 'networkstat'
MDTabbedPanel:
id: tab_panel
tab_display_mode:'text'
MDTab:
name: 'connections'
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, .35
height: dp(40)
MDLabel:
font_style: 'Title'
text: root.text_variable_1
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
MDTab:
name: 'processes'
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, .6
height: dp(40)
MDLabel:
font_style: 'Title'
text: root.text_variable_2
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "Brodcast"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .6
height: dp(40)
MDLabel:
font_style: 'Title'
text: root.text_variable_3
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "publickeys"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .6
height: dp(40)
MDLabel:
font_style: 'Title'
text: root.text_variable_4
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "objects"
BoxLayout:
AnchorLayout:
MDRaisedButton:
size_hint: .7, .6
height: dp(40)
MDLabel:
font_style: 'Title'
text: root.text_variable_5
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
2019-06-06 15:48:20 +02:00
<MailDetail>:
name: 'mailDetail'
ScrollView:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: dp(400)
padding: dp(32)
MDLabel:
font_style: 'Headline'
theme_text_color: 'Primary'
text: root.subject
halign: 'left'
2019-06-06 15:48:20 +02:00
MDLabel:
font_style: 'Subhead'
theme_text_color: 'Primary'
text: "From: " + root.from_addr
halign: 'left'
MDLabel:
font_style: 'Subhead'
theme_text_color: 'Primary'
text: "To: " + root.to_addr
halign: 'left'
MDLabel:
font_style: 'Subhead'
theme_text_color: 'Primary'
2019-06-06 15:48:20 +02:00
text: root.status
halign: 'left'
MDLabel:
font_style: 'Subhead'
theme_text_color: 'Primary'
text: root.message
halign: 'left'
2019-06-06 15:48:20 +02:00
bold: True
BoxLayout:
spacing:20
2019-06-06 15:48:20 +02:00
MDRaisedButton:
size_hint: 1, None
height: dp(40)
on_press: root.inbox_reply() if root.page_type == 'inbox' else root.copy_sent_mail() if root.page_type == 'sent' else root.write_msg()
MDLabel:
font_style: 'Title'
text: 'Reply' if root.page_type == 'inbox' else 'Copy' if root.page_type == 'sent' else 'Write'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
2019-06-06 15:48:20 +02:00
MDRaisedButton:
size_hint: 1, None
height: dp(40)
on_press: root.delete_mail()
MDLabel:
font_style: 'Title'
text: 'Delete'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
2019-06-06 15:48:20 +02:00
<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()
2019-06-06 15:48:20 +02:00
<MyaddDetailPopup>:
id: myadd_popup
background: './images/popup.jpeg'
separator_height: 0
auto_dismiss: False
BoxLayout:
size_hint_y: None
spacing:dp(70)
id: myadd_popup_box
orientation: 'vertical'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
spacing:dp(25)
MDLabel:
font_style: 'Title'
theme_text_color: 'Primary'
text: "Label"
font_size: '17sp'
halign: 'left'
MDLabel:
font_style: 'Subhead'
theme_text_color: 'Primary'
text: root.address_label
font_size: '15sp'
halign: 'left'
MDLabel:
font_style: 'Title'
theme_text_color: 'Primary'
text: "Address"
font_size: '17sp'
halign: 'left'
MDLabel:
font_style: 'Subhead'
theme_text_color: 'Primary'
text: root.address
font_size: '15sp'
halign: 'left'
BoxLayout:
spacing:5
orientation: 'horizontal'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
on_press: root.send_message_from()
MDLabel:
font_style: 'Title'
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: 'Title'
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: 'Title'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<AddbookDetailPopup>:
id: addbook_popup
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: 'Title'
theme_text_color: 'Primary'
text: "Label"
font_size: '17sp'
halign: 'left'
MDTextField:
id: add_label
font_style: 'Subhead'
font_size: '15sp'
halign: 'left'
text: root.address_label
theme_text_color: 'Primary'
required: True
helper_text_mode: "on_error"
MDLabel:
font_style: 'Title'
theme_text_color: 'Primary'
text: "Address"
font_size: '17sp'
halign: 'left'
MDLabel:
font_style: 'Subhead'
theme_text_color: 'Primary'
text: root.address
font_size: '15sp'
halign: 'left'
BoxLayout:
spacing:5
orientation: 'horizontal'
MDRaisedButton:
size_hint: 2, None
height: dp(40)
on_press: root.send_message_to()
MDLabel:
font_style: 'Title'
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: 'Title'
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: 'Title'
text: 'Cancel'
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
<ShowQRCode>:
name: 'showqrcode'
BoxLayout:
2019-06-06 15:48:20 +02:00
orientation: 'vertical'
id: qr
<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