annotate cagou/kv/xmlui.kv @ 251:1f579baf787a

xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget: there are some trouble with the ScrollView inside the ScrollView which need to be addressed
author Goffi <goffi@goffi.org>
date Sat, 26 Jan 2019 20:24:48 +0100
parents d535446fdf45
children 1b835bcfa663
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
126
cd99f70ea592 global file reorganisation:
Goffi <goffi@goffi.org>
parents: 99
diff changeset
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
38da086d162b xmlui: fixed Title color
Goffi <goffi@goffi.org>
parents: 175
diff changeset
20 <Title>:
38da086d162b xmlui: fixed Title color
Goffi <goffi@goffi.org>
parents: 175
diff changeset
21 color: 1, 1, 1, 1
38da086d162b xmlui: fixed Title color
Goffi <goffi@goffi.org>
parents: 175
diff changeset
22
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
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
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
28
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
29 <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
30 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
31 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
32 text_size: self.width, None
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
33 color: 1, 1, 1, 1
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
34
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
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
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 <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
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
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
245
d535446fdf45 xmlui: fixed divider drawing
Goffi <goffi@goffi.org>
parents: 241
diff changeset
62 points: 0, self.y + dp(10), self.width, self.y + dp(10)
53
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
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
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
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
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
251
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
73 layout: layout
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
74 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
75 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
76 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
77 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
78 BoxLayout:
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
79 id: layout
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
80 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
81 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
82 orientation: "vertical"
1f579baf787a xmlui: some design improvments + use ScrollView + BoxLayout instead of DropDown for ListWidget:
Goffi <goffi@goffi.org>
parents: 245
diff changeset
83 padding: dp(10)
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
84
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
85
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
86 <AdvancedListRow>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
87 canvas.before:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
88 Color:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
89 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
90 Rectangle:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
91 pos: self.pos
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
92 size: self.size
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
93 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
94 height: self.minimum_height
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
95 rows: 1
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
96 canvas.after:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
97 Color:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
98 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
99 Rectangle:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
100 pos: self.pos
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
101 size: self.size
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
102
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
103
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
104 <AdvancedListContainer>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
105 cols: 1
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
106 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
107 height: self.minimum_height
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
108
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
109
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
110 <VerticalContainer>:
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
111 size_hint: 1, 1
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
112 layout: layout
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
113 do_scroll_x: False
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
114 scroll_type: ['bars', 'content']
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
115 bar_width: dp(6)
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
116 BoxLayout:
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
117 id: layout
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
118 orientation: "vertical"
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
119 size_hint: 1, None
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
120 height: self.minimum_height
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
121
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
122
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
123 <PairsContainer>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
124 cols: 2
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
125 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
126 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
127 padding: dp(10)
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
128
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
129
69
a9c6b089070d xmlui: improvments to prepare parameters:
Goffi <goffi@goffi.org>
parents: 62
diff changeset
130 <TabsContainer>:
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
131 size_hint: 1, 1
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
132
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
133 <TabsPanelContainer>:
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
134 layout: layout
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
135 ScrollView:
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
136 do_scroll_x: False
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
137 scroll_type: ['bars', 'content']
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
138 bar_width: dp(6)
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
139 BoxLayout:
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
140 id: layout
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
141 orientation: "vertical"
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
142 size_hint: 1, None
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
143 height: self.minimum_height
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
144
53
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
145 <FormButton>:
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
146 size_hint: 1, None
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
147 height: dp(button_height)
65775152aac1 xmlui: implemented most of XMLUI, not finished yet
Goffi <goffi@goffi.org>
parents:
diff changeset
148
99
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
149
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
150 <FileDialog>:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
151 orientation: "vertical"
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
152 message: message
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
153 file_chooser: file_chooser
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
154 Label:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
155 id: message
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
156 size_hint: 1, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
157 text_size: root.width, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
158 size: self.texture_size
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
159 FileChooserListView:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
160 id: file_chooser
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
161 Button:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
162 size_hint: 1, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
163 height: dp(50)
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
164 text: "choose"
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
165 on_release: root.onSelect(file_chooser.selection)
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
166 Button:
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
167 size_hint: 1, None
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
168 height: dp(50)
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
169 text: "cancel"
f67b9baa81f0 xmlui: FileDialog first draft
Goffi <goffi@goffi.org>
parents: 69
diff changeset
170 on_release: root.onCancel()
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
146
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
173 <XMLUIPanel>:
241
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
174 orientation: "vertical"
661b9cf7b4e4 xmlui: scroll/size fixes:
Goffi <goffi@goffi.org>
parents: 236
diff changeset
175 size_hint: 1, 1
146
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
176 canvas.before:
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
177 Color:
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
178 rgba: 0, 0, 0, 1
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
179 Rectangle:
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
180 pos: self.pos
87eebe4628b8 xmlui: use a black background
Goffi <goffi@goffi.org>
parents: 131
diff changeset
181 size: self.size