diff 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
line wrap: on
line diff
--- a/src/cagou/kv/cagou_widget.kv	Tue Aug 09 22:06:00 2016 +0200
+++ b/src/cagou/kv/cagou_widget.kv	Wed Aug 10 01:24:37 2016 +0200
@@ -15,9 +15,28 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-<HeaderWidgetButton>:
+<HeaderWidgetChoice>:
+    canvas.before:
+        Color:
+            rgba: 1, 1, 1, 1
+        BorderImage:
+            pos: self.pos
+            size: self.size
+            source: 'atlas://data/images/defaulttheme/button'
     size_hint_y: None
     height: 44
+    Image:
+        size_hint: None, 1
+        source: root.plugin_info['icon_medium']
+        allow_stretch: True
+        width: self.texture_size[0]*self.height/self.texture_size[1]
+    Label:
+        size_hint: 1, 1
+        text: root.plugin_info['name']
+        bold: True
+        text_size: self.size
+        halign: "center"
+        valign: "middle"
 
 <HeaderWidgetSelector>:
     size_hint: 0.3, 1
@@ -27,12 +46,13 @@
     header_input: header_input
     BoxLayout:
         size_hint: 1, None
-        height: 30
-        Button:
-            text: "wid_XXX"
+        height: 32
+        HeaderWidgetCurrent:
             on_release: root.selector.open(self)
+            source: root.plugin_info['icon_small']
             size_hint: None, 1
-            width: 60
+            allow_stretch: True
+            width: self.texture_size[0]*self.height/self.texture_size[1]
         TextInput:
             id: header_input
             multiline: False