comparison cagou/kv/share_widget.kv @ 348:38fd457b2158

core (common, share_widget): new JidSelector widget: - A widget to select jid among a list is commonly needed, so it has been implemented in core.common, based on the code from ShareWidget - ShareWidget has been adapted accordingly - new ContactButton class in core.common
author Goffi <goffi@goffi.org>
date Fri, 17 Jan 2020 18:44:32 +0100
parents e2b51663d8b8
children 3669a26ef7d9
comparison
equal deleted inserted replaced
347:bf9474e164f3 348:38fd457b2158
18 #:import C cagou.core.constants.Const 18 #:import C cagou.core.constants.Const
19 19
20 20
21 <ShareWidget>: 21 <ShareWidget>:
22 preview_box: preview_box 22 preview_box: preview_box
23 layout: layout
24 orientation: 'vertical' 23 orientation: 'vertical'
25 Label: 24 Label:
26 size_hint: 1, None 25 size_hint: 1, None
27 text_size: self.size 26 text_size: self.size
28 halign: 'center' 27 halign: 'center'
42 halign: 'center' 41 halign: 'center'
43 text: _("with") 42 text: _("with")
44 height: self.font_size + dp(5) 43 height: self.font_size + dp(5)
45 bold: True 44 bold: True
46 font_size: '25sp' 45 font_size: '25sp'
47 ScrollView: 46 JidSelector:
48 StackLayout: 47 on_select: root.on_select(args[1])
49 id: layout
50 size_hint: 1, None
51 height: self.minimum_height
52 spacing: 0
53 Button: 48 Button:
54 size_hint: 1, None 49 size_hint: 1, None
55 height: C.BTN_HEIGHT 50 height: C.BTN_HEIGHT
56 text: _("cancel") 51 text: _("cancel")
57 on_press: app.host.closeUI() 52 on_press: app.host.closeUI()