comparison cagou/kv/cagou_widget.kv @ 164:60b2b2bad747

core (widget selector): adjusted selector size to content, and added some spacing
author Goffi <goffi@goffi.org>
date Sat, 28 Apr 2018 12:31:48 +0200
parents b9139c87f393
children d65a51fa00b9
comparison
equal deleted inserted replaced
163:ef09dce878c7 164:60b2b2bad747
23 pos: self.pos 23 pos: self.pos
24 size: self.size 24 size: self.size
25 source: 'atlas://data/images/defaulttheme/button' 25 source: 'atlas://data/images/defaulttheme/button'
26 size_hint_y: None 26 size_hint_y: None
27 height: dp(44) 27 height: dp(44)
28 spacing: dp(20)
29 padding: dp(5), dp(3), dp(10), dp(3)
28 Image: 30 Image:
29 size_hint: None, 1 31 size_hint: None, 1
30 source: root.plugin_info['icon_medium'] 32 source: root.plugin_info['icon_medium']
31 allow_stretch: True 33 allow_stretch: True
32 width: self.texture_size[0]*self.height/(self.texture_size[1] or 1) 34 width: self.height
33 Label: 35 Label:
34 size_hint: 1, 1 36 size_hint: None, 1
35 text: root.plugin_info['name'] 37 text: root.plugin_info['name']
36 color: 1, 1, 1, 1 38 color: 1, 1, 1, 1
37 bold: True 39 bold: True
38 text_size: self.size 40 size: self.texture_size
39 halign: "center" 41 halign: "center"
40 valign: "middle" 42 valign: "middle"
41 43
42 <HeaderWidgetSelector>: 44 <HeaderWidgetSelector>:
43 size_hint: 0.3, None 45 size_hint: None, None
44 auto_width: False 46 auto_width: False
45 canvas.before: 47 canvas.before:
46 Color: 48 Color:
47 rgba: 0, 0, 0, 1 49 rgba: 0, 0, 0, 1
48 Rectangle: 50 Rectangle:
54 header_box: header_box 56 header_box: header_box
55 BoxLayout: 57 BoxLayout:
56 id: header_box 58 id: header_box
57 size_hint: 1, None 59 size_hint: 1, None
58 height: dp(32) 60 height: dp(32)
61 spacing: dp(3)
59 HeaderWidgetCurrent: 62 HeaderWidgetCurrent:
60 on_release: root.selector.open(self) 63 on_release: root.selector.open(self)
61 source: root.plugin_info['icon_small'] 64 source: root.plugin_info['icon_small']
62 size_hint: None, 1 65 size_hint: None, 1
63 allow_stretch: True 66 allow_stretch: True
64 width: self.texture_size[0]*self.height/(self.texture_size[1] or 1) 67 width: self.height
65 TextInput: 68 TextInput:
66 id: header_input 69 id: header_input
67 multiline: False 70 multiline: False
68 on_text_validate: root.onHeaderInput() 71 on_text_validate: root.onHeaderInput()
69 on_text: root.onHeaderInputComplete(*args) 72 on_text: root.onHeaderInputComplete(*args)