Mercurial > libervia-desktop-kivy
annotate cagou/kv/xmlui.kv @ 244:5bd94bc08f5c
plugin chat: fixed OTR State filtering + removed some legacy code
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 03 Jan 2019 20:38:46 +0100 |
parents | 661b9cf7b4e4 |
children | d535446fdf45 |
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 | |
241 | 23 <EmptyWidget,StringWidget,PasswordWidget,JidInputWidget>: |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 height: dp(common_height) |
131
36fc269e2a32
core: changed default background color to white
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
26 color: 1, 1, 1, 1 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
27 |
99 | 28 |
241 | 29 <TextWidget,LabelWidget,JidWidget>: |
30 size_hint: 1, None | |
31 text_size: self.width, None | |
32 height: max(dp(common_height), self.texture_size[1]) | |
33 color: 1, 1, 1, 1 | |
34 | |
35 | |
175
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
36 <StringWidget,PasswordWidget,IntWidget>: |
236
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
37 multiline: False |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
38 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
|
39 |
236
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
40 |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
41 <TextBoxWidget>: |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
42 multiline: True |
ca86954b3788
xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents:
200
diff
changeset
|
43 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
|
44 |
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
45 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 <ButtonWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
48 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 |
99 | 50 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
51 <BoolWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
52 size_hint: 1, 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
53 |
99 | 54 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
55 <DividerWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
56 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
57 height: dp(20) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
58 canvas.before: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
59 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
60 rgba: 1, 1, 1, 0.8 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 Line |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
62 points: 0, dp(10), self.width, dp(10) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
63 width: dp(3) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
64 |
99 | 65 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 <ListWidgetItem>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
67 size_hint_y: None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
68 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
69 |
99 | 70 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 <ListWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
72 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
73 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
74 |
99 | 75 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
76 <AdvancedListRow>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
77 canvas.before: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
78 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 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
|
80 Rectangle: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
81 pos: self.pos |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
82 size: self.size |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
83 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
84 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 rows: 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 canvas.after: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
87 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
88 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
|
89 Rectangle: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
90 pos: self.pos |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
91 size: self.size |
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 <AdvancedListContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
95 cols: 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
96 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
97 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
98 |
99 | 99 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
100 <VerticalContainer>: |
241 | 101 size_hint: 1, 1 |
102 layout: layout | |
103 do_scroll_x: False | |
104 scroll_type: ['bars', 'content'] | |
105 bar_width: dp(6) | |
106 BoxLayout: | |
107 id: layout | |
108 orientation: "vertical" | |
109 size_hint: 1, None | |
110 height: self.minimum_height | |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
111 |
99 | 112 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
113 <PairsContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
114 cols: 2 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
115 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
116 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
117 |
99 | 118 |
69
a9c6b089070d
xmlui: improvments to prepare parameters:
Goffi <goffi@goffi.org>
parents:
62
diff
changeset
|
119 <TabsContainer>: |
241 | 120 size_hint: 1, 1 |
121 | |
122 <TabsPanelContainer>: | |
123 layout: layout | |
124 ScrollView: | |
125 do_scroll_x: False | |
126 scroll_type: ['bars', 'content'] | |
127 bar_width: dp(6) | |
128 BoxLayout: | |
129 id: layout | |
130 orientation: "vertical" | |
131 size_hint: 1, None | |
132 height: self.minimum_height | |
99 | 133 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
134 <FormButton>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
135 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
136 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
137 |
99 | 138 |
139 <FileDialog>: | |
140 orientation: "vertical" | |
141 message: message | |
142 file_chooser: file_chooser | |
143 Label: | |
144 id: message | |
145 size_hint: 1, None | |
146 text_size: root.width, None | |
147 size: self.texture_size | |
148 FileChooserListView: | |
149 id: file_chooser | |
150 Button: | |
151 size_hint: 1, None | |
152 height: dp(50) | |
153 text: "choose" | |
154 on_release: root.onSelect(file_chooser.selection) | |
155 Button: | |
156 size_hint: 1, None | |
157 height: dp(50) | |
158 text: "cancel" | |
159 on_release: root.onCancel() | |
160 | |
161 | |
146 | 162 <XMLUIPanel>: |
241 | 163 orientation: "vertical" |
164 size_hint: 1, 1 | |
146 | 165 canvas.before: |
166 Color: | |
167 rgba: 0, 0, 0, 1 | |
168 Rectangle: | |
169 pos: self.pos | |
170 size: self.size |