comparison cagou/plugins/plugin_wid_contact_list.kv @ 221:e1a385a791cc

plugin contact list: implemented contact addition
author Goffi <goffi@goffi.org>
date Tue, 26 Jun 2018 07:36:11 +0200
parents 9faccd140119
children 9e5f9f0cee48
comparison
equal deleted inserted replaced
220:24f8ab7c08be 221:e1a385a791cc
13 13
14 # You should have received a copy of the GNU Affero General Public License 14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17 #:import _ sat.core.i18n._ 17 #:import _ sat.core.i18n._
18
19 <AddContactMenu>:
20 padding: dp(20)
21 spacing: dp(10)
22 Label:
23 size_hint: 1, None
24 color: 1, 1, 1, 1
25 text: root.instructions
26 text_size: root.width, None
27 size: self.texture_size
28 halign: "center"
29 bold: True
30 TextInput:
31 id: contact_jid
32 size_hint: 1, None
33 height: sp(30)
34 hint_text: _("enter here your new contact JID")
35 Button:
36 size_hint: 1, None
37 height: sp(50)
38 text: _("add this contact")
39 on_release: root.addContact(contact_jid.text)
40 Widget:
41
18 42
19 <ContactItem>: 43 <ContactItem>:
20 size_hint: None, None 44 size_hint: None, None
21 width: self.base_width 45 width: self.base_width
22 height: self.minimum_height 46 height: self.minimum_height
35 text: root.jid 59 text: root.jid
36 bold: True 60 bold: True
37 valign: 'middle' 61 valign: 'middle'
38 halign: 'center' 62 halign: 'center'
39 63
64
40 <ContactList>: 65 <ContactList>:
41 float_layout: float_layout 66 float_layout: float_layout
42 layout: layout 67 layout: layout
43 orientation: 'vertical' 68 orientation: 'vertical'
44 BoxLayout: 69 BoxLayout:
46 height: dp(30) 71 height: dp(30)
47 Widget: 72 Widget:
48 SymbolLabel: 73 SymbolLabel:
49 symbol: 'plus-circled' 74 symbol: 'plus-circled'
50 text: _("add a contact") 75 text: _("add a contact")
76 on_release: root.addContactMenu()
51 Widget: 77 Widget:
52 FloatLayout: 78 FloatLayout:
53 id: float_layout 79 id: float_layout
54 ScrollView: 80 ScrollView:
55 size_hint: 1, 1 81 size_hint: 1, 1