comparison src/cagou/kv/xmlui.kv @ 99:f67b9baa81f0

xmlui: FileDialog first draft implemented a basic file dialog. Really basic and ugly, need improvments!
author Goffi <goffi@goffi.org>
date Thu, 29 Dec 2016 23:47:13 +0100
parents a9c6b089070d
children
comparison
equal deleted inserted replaced
98:4d8c122b86a6 99:f67b9baa81f0
19 19
20 <EmptyWidget,TextWidget,LabelWidget,JidWidget,StringWidget,PasswordWidget,JidInputWidget>: 20 <EmptyWidget,TextWidget,LabelWidget,JidWidget,StringWidget,PasswordWidget,JidInputWidget>:
21 size_hint: 1, None 21 size_hint: 1, None
22 height: dp(common_height) 22 height: dp(common_height)
23 23
24
24 <ButtonWidget>: 25 <ButtonWidget>:
25 size_hint: 1, None 26 size_hint: 1, None
26 height: dp(button_height) 27 height: dp(button_height)
27 28
29
28 <BoolWidget>: 30 <BoolWidget>:
29 size_hint: 1, 1 31 size_hint: 1, 1
32
30 33
31 <DividerWidget>: 34 <DividerWidget>:
32 size_hint: 1, None 35 size_hint: 1, None
33 height: dp(20) 36 height: dp(20)
34 canvas.before: 37 canvas.before:
36 rgba: 1, 1, 1, 0.8 39 rgba: 1, 1, 1, 0.8
37 Line 40 Line
38 points: 0, dp(10), self.width, dp(10) 41 points: 0, dp(10), self.width, dp(10)
39 width: dp(3) 42 width: dp(3)
40 43
44
41 <ListWidgetItem>: 45 <ListWidgetItem>:
42 size_hint_y: None 46 size_hint_y: None
43 height: dp(button_height) 47 height: dp(button_height)
44 48
49
45 <ListWidget>: 50 <ListWidget>:
46 size_hint: 1, None 51 size_hint: 1, None
47 height: dp(button_height) 52 height: dp(button_height)
53
48 54
49 <AdvancedListRow>: 55 <AdvancedListRow>:
50 canvas.before: 56 canvas.before:
51 Color: 57 Color:
52 rgba: 1, 1, 1, 0.2 if self.global_index%2 else 0.1 58 rgba: 1, 1, 1, 0.2 if self.global_index%2 else 0.1
61 rgba: 0, 0, 1, 0.5 if self.selected else 0 67 rgba: 0, 0, 1, 0.5 if self.selected else 0
62 Rectangle: 68 Rectangle:
63 pos: self.pos 69 pos: self.pos
64 size: self.size 70 size: self.size
65 71
72
66 <AdvancedListContainer>: 73 <AdvancedListContainer>:
67 cols: 1 74 cols: 1
68 size_hint: 1, None 75 size_hint: 1, None
69 height: self.minimum_height 76 height: self.minimum_height
77
70 78
71 <VerticalContainer>: 79 <VerticalContainer>:
72 cols: 1 80 cols: 1
73 size_hint: 1, None 81 size_hint: 1, None
74 height: self.minimum_height 82 height: self.minimum_height
75 83
84
76 <PairsContainer>: 85 <PairsContainer>:
77 cols: 2 86 cols: 2
78 size_hint: 1, None 87 size_hint: 1, None
79 height: self.minimum_height 88 height: self.minimum_height
80 89
90
81 <TabsContainer>: 91 <TabsContainer>:
82 size_hint: 1, None 92 size_hint: 1, None
83 height: 100 93 height: 100
94
84 95
85 <FormButton>: 96 <FormButton>:
86 size_hint: 1, None 97 size_hint: 1, None
87 height: dp(button_height) 98 height: dp(button_height)
88 99
100
101 <FileDialog>:
102 orientation: "vertical"
103 message: message
104 file_chooser: file_chooser
105 Label:
106 id: message
107 size_hint: 1, None
108 text_size: root.width, None
109 size: self.texture_size
110 FileChooserListView:
111 id: file_chooser
112 Button:
113 size_hint: 1, None
114 height: dp(50)
115 text: "choose"
116 on_release: root.onSelect(file_chooser.selection)
117 Button:
118 size_hint: 1, None
119 height: dp(50)
120 text: "cancel"
121 on_release: root.onCancel()
122
123
124
89 <XMLUIPanelGrid>: 125 <XMLUIPanelGrid>:
90 cols: 1 126 cols: 1
91 size_hint: 1, None 127 size_hint: 1, None
92 height: self.minimum_height 128 height: self.minimum_height