comparison src/cagou/kv/cagou_widget.kv @ 25:d09bd16dbbe2

code (cagou widget), selector: icons handling + use of new muchoslava icon set
author Goffi <goffi@goffi.org>
date Wed, 10 Aug 2016 01:24:37 +0200
parents 29b507826eed
children e77b616d3fae
comparison
equal deleted inserted replaced
24:bc15b55a4114 25:d09bd16dbbe2
13 13
14 # You should have received a copy of the GNU Affero General Public License 14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17 17
18 <HeaderWidgetButton>: 18 <HeaderWidgetChoice>:
19 canvas.before:
20 Color:
21 rgba: 1, 1, 1, 1
22 BorderImage:
23 pos: self.pos
24 size: self.size
25 source: 'atlas://data/images/defaulttheme/button'
19 size_hint_y: None 26 size_hint_y: None
20 height: 44 27 height: 44
28 Image:
29 size_hint: None, 1
30 source: root.plugin_info['icon_medium']
31 allow_stretch: True
32 width: self.texture_size[0]*self.height/self.texture_size[1]
33 Label:
34 size_hint: 1, 1
35 text: root.plugin_info['name']
36 bold: True
37 text_size: self.size
38 halign: "center"
39 valign: "middle"
21 40
22 <HeaderWidgetSelector>: 41 <HeaderWidgetSelector>:
23 size_hint: 0.3, 1 42 size_hint: 0.3, 1
24 auto_width: False 43 auto_width: False
25 44
26 <CagouWidget>: 45 <CagouWidget>:
27 header_input: header_input 46 header_input: header_input
28 BoxLayout: 47 BoxLayout:
29 size_hint: 1, None 48 size_hint: 1, None
30 height: 30 49 height: 32
31 Button: 50 HeaderWidgetCurrent:
32 text: "wid_XXX"
33 on_release: root.selector.open(self) 51 on_release: root.selector.open(self)
52 source: root.plugin_info['icon_small']
34 size_hint: None, 1 53 size_hint: None, 1
35 width: 60 54 allow_stretch: True
55 width: self.texture_size[0]*self.height/self.texture_size[1]
36 TextInput: 56 TextInput:
37 id: header_input 57 id: header_input
38 multiline: False 58 multiline: False
39 on_text_validate: root.onHeaderInput() 59 on_text_validate: root.onHeaderInput()