Mercurial > libervia-desktop-kivy
comparison cagou/kv/xmlui.kv @ 241:661b9cf7b4e4
xmlui: scroll/size fixes:
- VerticalContainer and TabsPanelContainer are now put in ScrollView
- the height hack in TabsContainer has been removed has it is not needed anymore (minimum_height is now available)
- remove the empty widget which was added at the end of main panel, it's better to have the UI taking the whole container height
- fixed height for TextWidget,LabelWidget and JidWidget
- better scrollbar for VerticalContainer and TabsPanelContainer
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 03 Jan 2019 10:42:43 +0100 |
parents | ca86954b3788 |
children | d535446fdf45 |
comparison
equal
deleted
inserted
replaced
240:f555b10712d7 | 241:661b9cf7b4e4 |
---|---|
18 #:set button_height 50 | 18 #:set button_height 50 |
19 | 19 |
20 <Title>: | 20 <Title>: |
21 color: 1, 1, 1, 1 | 21 color: 1, 1, 1, 1 |
22 | 22 |
23 | 23 <EmptyWidget,StringWidget,PasswordWidget,JidInputWidget>: |
24 <EmptyWidget,TextWidget,LabelWidget,JidWidget,StringWidget,PasswordWidget,JidInputWidget>: | |
25 size_hint: 1, None | 24 size_hint: 1, None |
26 height: dp(common_height) | 25 height: dp(common_height) |
26 color: 1, 1, 1, 1 | |
27 | |
28 | |
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]) | |
27 color: 1, 1, 1, 1 | 33 color: 1, 1, 1, 1 |
28 | 34 |
29 | 35 |
30 <StringWidget,PasswordWidget,IntWidget>: | 36 <StringWidget,PasswordWidget,IntWidget>: |
31 multiline: False | 37 multiline: False |
90 size_hint: 1, None | 96 size_hint: 1, None |
91 height: self.minimum_height | 97 height: self.minimum_height |
92 | 98 |
93 | 99 |
94 <VerticalContainer>: | 100 <VerticalContainer>: |
95 size_hint: 1, None | 101 size_hint: 1, 1 |
96 height: self.minimum_height | 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 | |
97 | 111 |
98 | 112 |
99 <PairsContainer>: | 113 <PairsContainer>: |
100 cols: 2 | 114 cols: 2 |
101 size_hint: 1, None | 115 size_hint: 1, None |
102 height: self.minimum_height | 116 height: self.minimum_height |
103 | 117 |
104 | 118 |
105 <TabsContainer>: | 119 <TabsContainer>: |
106 size_hint: 1, None | 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 | |
107 | 133 |
108 <FormButton>: | 134 <FormButton>: |
109 size_hint: 1, None | 135 size_hint: 1, None |
110 height: dp(button_height) | 136 height: dp(button_height) |
111 | 137 |
132 text: "cancel" | 158 text: "cancel" |
133 on_release: root.onCancel() | 159 on_release: root.onCancel() |
134 | 160 |
135 | 161 |
136 <XMLUIPanel>: | 162 <XMLUIPanel>: |
137 height: self.minimum_height | 163 orientation: "vertical" |
164 size_hint: 1, 1 | |
138 canvas.before: | 165 canvas.before: |
139 Color: | 166 Color: |
140 rgba: 0, 0, 0, 1 | 167 rgba: 0, 0, 0, 1 |
141 Rectangle: | 168 Rectangle: |
142 pos: self.pos | 169 pos: self.pos |