Mercurial > libervia-desktop-kivy
annotate cagou/kv/xmlui.kv @ 237:059c5b39032d
plugin file sharing: moved common discovery widgets to new core.common_widgets module
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 31 Aug 2018 16:59:38 +0200 |
parents | ca86954b3788 |
children | 661b9cf7b4e4 |
rev | line source |
---|---|
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client |
126 | 2 # Copyright (C) 2016-2018 Jérôme Poisson (goffi@goffi.org) |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 # This program is free software: you can redistribute it and/or modify |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 # it under the terms of the GNU Affero General Public License as published by |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 # the Free Software Foundation, either version 3 of the License, or |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 # (at your option) any later version. |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 # This program is distributed in the hope that it will be useful, |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 # GNU Affero General Public License for more details. |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 # You should have received a copy of the GNU Affero General Public License |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 #:set common_height 30 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 #:set button_height 50 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 |
200 | 20 <Title>: |
21 color: 1, 1, 1, 1 | |
22 | |
23 | |
62 | 24 <EmptyWidget,TextWidget,LabelWidget,JidWidget,StringWidget,PasswordWidget,JidInputWidget>: |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 height: dp(common_height) |
131
36fc269e2a32
core: changed default background color to white
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
27 color: 1, 1, 1, 1 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
28 |
99 | 29 |
175
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
30 <StringWidget,PasswordWidget,IntWidget>: |
236
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
31 multiline: False |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
32 background_normal: app.expand('atlas://data/images/defaulttheme/textinput') |
175
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
33 |
236
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
34 |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
35 <TextBoxWidget>: |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
36 multiline: True |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
37 height: dp(common_height) * 5 |
175
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
38 |
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
39 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
40 <ButtonWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
41 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
42 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 |
99 | 44 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
45 <BoolWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 size_hint: 1, 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 |
99 | 48 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 <DividerWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
50 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
51 height: dp(20) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
52 canvas.before: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
53 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
54 rgba: 1, 1, 1, 0.8 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
55 Line |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
56 points: 0, dp(10), self.width, dp(10) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
57 width: dp(3) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
58 |
99 | 59 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
60 <ListWidgetItem>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 size_hint_y: None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
62 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
63 |
99 | 64 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
65 <ListWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
67 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
68 |
99 | 69 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
70 <AdvancedListRow>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 canvas.before: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
72 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
73 rgba: 1, 1, 1, 0.2 if self.global_index%2 else 0.1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
74 Rectangle: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
75 pos: self.pos |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
76 size: self.size |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
77 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
78 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 rows: 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
80 canvas.after: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
81 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
82 rgba: 0, 0, 1, 0.5 if self.selected else 0 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
83 Rectangle: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
84 pos: self.pos |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 size: self.size |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 |
99 | 87 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
88 <AdvancedListContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
89 cols: 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
90 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
91 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
92 |
99 | 93 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
94 <VerticalContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
95 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
96 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
97 |
99 | 98 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
99 <PairsContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
100 cols: 2 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
101 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
102 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
103 |
99 | 104 |
69
a9c6b089070d
xmlui: improvments to prepare parameters:
Goffi <goffi@goffi.org>
parents:
62
diff
changeset
|
105 <TabsContainer>: |
a9c6b089070d
xmlui: improvments to prepare parameters:
Goffi <goffi@goffi.org>
parents:
62
diff
changeset
|
106 size_hint: 1, None |
99 | 107 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
108 <FormButton>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
109 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
110 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
111 |
99 | 112 |
113 <FileDialog>: | |
114 orientation: "vertical" | |
115 message: message | |
116 file_chooser: file_chooser | |
117 Label: | |
118 id: message | |
119 size_hint: 1, None | |
120 text_size: root.width, None | |
121 size: self.texture_size | |
122 FileChooserListView: | |
123 id: file_chooser | |
124 Button: | |
125 size_hint: 1, None | |
126 height: dp(50) | |
127 text: "choose" | |
128 on_release: root.onSelect(file_chooser.selection) | |
129 Button: | |
130 size_hint: 1, None | |
131 height: dp(50) | |
132 text: "cancel" | |
133 on_release: root.onCancel() | |
134 | |
135 | |
146 | 136 <XMLUIPanel>: |
236
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
137 height: self.minimum_height |
146 | 138 canvas.before: |
139 Color: | |
140 rgba: 0, 0, 0, 1 | |
141 Rectangle: | |
142 pos: self.pos | |
143 size: self.size |