annotate cagou/kv/xmlui.kv @ 286:4772ba26623f

xmlui: many improvments: - use a white background to be coherent with the rest of the UI - cancel button is added on "window" XMLUIs - use color for submit/save buttons - VerticalContainer is not a ScrollView anymore, XMLUIPanel now has the main ScrollView - when a TabsContainer is used as main container, main XMLUIPanel ScrollView touch events are disabled, to improve user experience (Kivy doesn't support well ScrollView inside an other ScrollView) - use BoxLayout instead of GridLayout in AdvancedList*, as they use one row/col only - fixed DividerWidget line location - added margins in XMLUI panels - renamed Settings main class to CagouSettings, to avoid conflict with Kivy's Settings class (which is causing troubles with kv)
author Goffi <goffi@goffi.org>
date Wed, 27 Mar 2019 22:22:51 +0100
parents 1b835bcfa663
children 3c9ba4a694ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
282
1b835bcfa663 date update
Goffi <goffi@goffi.org>
parents: 251
diff changeset
2 # Copyright (C) 2016-2019 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
38da086d162b xmlui: fixed Title color
Goffi <goffi@goffi.org>
parents: 175
diff changeset
20
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
21 <EmptyWidget,StringWidget,PasswordWidget,JidInputWidget>:
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
22 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
23 height: dp(common_height)
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
24
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
25
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
26 <TextWidget,LabelWidget,JidWidget>:
251
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
27 size_hint: 1, 1
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
28 size_hint_min_y: max(dp(common_height), self.texture_size[1])
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
29 text_size: self.width, None
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
30
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
31
175
d65a51fa00b9 core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents: 159
diff changeset
32 <StringWidget,PasswordWidget,IntWidget>:
236
ca86954b3788 xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents: 200
diff changeset
33 multiline: False
ca86954b3788 xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents: 200
diff changeset
34 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
35
236
ca86954b3788 xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents: 200
diff changeset
36
ca86954b3788 xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents: 200
diff changeset
37 <TextBoxWidget>:
ca86954b3788 xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents: 200
diff changeset
38 multiline: True
ca86954b3788 xmlui: implemented TextBoxWidget + set height for XMLUIPanel
Goffi <goffi@goffi.org>
parents: 200
diff changeset
39 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
40
d65a51fa00b9 core: use hollow borders for TextInput (except for XMLUI, for now)
Goffi <goffi@goffi.org>
parents: 159
diff changeset
41
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
42 <ButtonWidget>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
43 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
44 height: dp(button_height)
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
45
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
46
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
47 <BoolWidget>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
48 size_hint: 1, 1
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
49
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
50
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
51 <DividerWidget>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
52 size_hint: 1, None
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
53 height: dp(12)
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
54 canvas.before:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
55 Color:
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
56 rgba: 0, 0, 0, 1
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
57 Line
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
58 points: self.x, self.y + dp(5), self.x + self.width, self.y + dp(5)
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
59 width: dp(2)
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
60
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
61
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
62 <ListWidgetItem>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
63 size_hint_y: None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
64 height: dp(button_height)
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
65
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
66
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
67 <ListWidget>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
68 size_hint: 1, None
251
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
69 layout: layout
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
70 height: min(layout.minimum_height, dp(250))
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
71 do_scroll_x: False
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
72 scroll_type: ['bars', 'content']
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
73 bar_width: dp(6)
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
74 BoxLayout:
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
75 id: layout
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
76 size_hint: 1, None
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
77 height: self.minimum_height
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
78 orientation: "vertical"
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
79 padding: dp(10)
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
80
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
81
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
82 <AdvancedListRow>:
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
83 orientation: "horizontal"
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
84 size_hint: 1, None
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
85 height: self.minimum_height
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
86 canvas.before:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
87 Color:
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
88 rgba: app.c_prim_light if self.global_index%2 else app.c_prim_dark
53
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 canvas.after:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
93 Color:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
94 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
95 Rectangle:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
96 pos: self.pos
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
97 size: self.size
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
98
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
99
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
100 <AdvancedListContainer>:
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
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
103 orientation: "vertical"
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
104
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
105
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
106 <VerticalContainer>:
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
107 orientation: "vertical"
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
108 size_hint: 1, None
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
109 height: self.minimum_height
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
110
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
111 <PairsContainer>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
112 cols: 2
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
113 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
114 height: self.minimum_height
251
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
115 padding: dp(10)
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
116
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
117
69
a9c6b089070d xmlui: improvments to prepare parameters:
Goffi <goffi@goffi.org>
parents: 62
diff changeset
118 <TabsContainer>:
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
119 size_hint: 1, None
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
120 height: dp(200)
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
121
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
122 <TabsPanelContainer>:
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
123 layout: layout
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
124 ScrollView:
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
125 do_scroll_x: False
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
126 scroll_type: ['bars', 'content']
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
127 bar_width: dp(6)
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
128 canvas.before:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
129 Color:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
130 rgba: 1, 1, 1, 1
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
131 Rectangle:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
132 pos: self.pos
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
133 size: self.size
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
134 BoxLayout:
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
135 id: layout
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
136 orientation: "vertical"
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
137 size_hint: 1, None
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
138 height: self.minimum_height
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
139 canvas.before:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
140 Color:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
141 rgba: 1, 1, 1, 1
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
142 Rectangle:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
143 pos: self.pos
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
144 size: self.size
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
145
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
146
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
147 <FormButton>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
148 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
149 height: dp(button_height)
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
150 color: 0, 0, 0, 1
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
151 bold: True
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
152
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
153
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
154 <SubmitButton>:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
155 text: _(u"Submit")
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
156 background_normal: ''
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
157 background_color: 0.33, 0.67, 0.0, 1
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
158
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
159
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
160 <CancelButton>:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
161 text: _(u"Cancel")
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
162 color: 1, 1, 1, 1
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
163 bold: False
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
164
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
165
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
166 <SaveButton>:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
167 text: _(u"Save")
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
168 background_normal: ''
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
169 background_color: 0.33, 0.67, 0.0, 1
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
170
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
171
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
172 <FileDialog>:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
173 orientation: "vertical"
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
174 message: message
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
175 file_chooser: file_chooser
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
176 Label:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
177 id: message
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
178 size_hint: 1, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
179 text_size: root.width, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
180 size: self.texture_size
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
181 FileChooserListView:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
182 id: file_chooser
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
183 Button:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
184 size_hint: 1, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
185 height: dp(50)
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
186 text: "choose"
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
187 on_release: root.onSelect(file_chooser.selection)
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
188 Button:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
189 size_hint: 1, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
190 height: dp(50)
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
191 text: "cancel"
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
192 on_release: root.onCancel()
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
193
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
194
146
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
195 <XMLUIPanel>:
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
196 size_hint: 1, 1
286
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
197 layout: layout
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
198 do_scroll_x: False
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
199 scroll_type: ['bars', 'content']
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
200 bar_width: dp(6)
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
201 BoxLayout:
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
202 id: layout
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
203 orientation: "vertical"
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
204 size_hint: 1, None
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
205 padding: app.MARGIN_LEFT, 0, app.MARGIN_RIGHT, 0
4772ba26623f xmlui: many improvments:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
206 height: self.minimum_height