Mercurial > libervia-desktop-kivy
annotate cagou/kv/xmlui.kv @ 188:0abd24ab81b1
core: retrieve downloads_dir on startup
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 22 May 2018 19:25:23 +0200 |
parents | d65a51fa00b9 |
children | 38da086d162b |
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 |
62 | 20 <EmptyWidget,TextWidget,LabelWidget,JidWidget,StringWidget,PasswordWidget,JidInputWidget>: |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 height: dp(common_height) |
131
36fc269e2a32
core: changed default background color to white
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
23 color: 1, 1, 1, 1 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 |
99 | 25 |
175
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
26 <StringWidget,PasswordWidget,IntWidget>: |
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
27 |
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
28 background_normal: app.expand('atlas://data/images/defaulttheme/textinput') |
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
29 |
d65a51fa00b9
core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents:
159
diff
changeset
|
30 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
31 <ButtonWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
32 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
33 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
34 |
99 | 35 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
36 <BoolWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
37 size_hint: 1, 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
38 |
99 | 39 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
40 <DividerWidget>: |
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(20) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 canvas.before: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
44 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
45 rgba: 1, 1, 1, 0.8 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 Line |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 points: 0, dp(10), self.width, dp(10) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
48 width: dp(3) |
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 <ListWidgetItem>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
52 size_hint_y: None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
53 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
54 |
99 | 55 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
56 <ListWidget>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
57 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
58 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
59 |
99 | 60 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 <AdvancedListRow>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
62 canvas.before: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
63 Color: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
64 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
|
65 Rectangle: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 pos: self.pos |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
67 size: self.size |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
68 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
69 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
70 rows: 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 canvas.after: |
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: 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
|
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 |
99 | 78 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 <AdvancedListContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
80 cols: 1 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
81 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
82 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
83 |
99 | 84 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 <VerticalContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
87 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
88 |
99 | 89 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
90 <PairsContainer>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
91 cols: 2 |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
92 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
93 height: self.minimum_height |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
94 |
99 | 95 |
69
a9c6b089070d
xmlui: improvments to prepare parameters:
Goffi <goffi@goffi.org>
parents:
62
diff
changeset
|
96 <TabsContainer>: |
a9c6b089070d
xmlui: improvments to prepare parameters:
Goffi <goffi@goffi.org>
parents:
62
diff
changeset
|
97 size_hint: 1, None |
99 | 98 |
53
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
99 <FormButton>: |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
100 size_hint: 1, None |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
101 height: dp(button_height) |
65775152aac1
xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
102 |
99 | 103 |
104 <FileDialog>: | |
105 orientation: "vertical" | |
106 message: message | |
107 file_chooser: file_chooser | |
108 Label: | |
109 id: message | |
110 size_hint: 1, None | |
111 text_size: root.width, None | |
112 size: self.texture_size | |
113 FileChooserListView: | |
114 id: file_chooser | |
115 Button: | |
116 size_hint: 1, None | |
117 height: dp(50) | |
118 text: "choose" | |
119 on_release: root.onSelect(file_chooser.selection) | |
120 Button: | |
121 size_hint: 1, None | |
122 height: dp(50) | |
123 text: "cancel" | |
124 on_release: root.onCancel() | |
125 | |
126 | |
146 | 127 <XMLUIPanel>: |
128 canvas.before: | |
129 Color: | |
130 rgba: 0, 0, 0, 1 | |
131 Rectangle: | |
132 pos: self.pos | |
133 size: self.size |