diff cagou/kv/cagou_widget.kv @ 179:7177fe2d9725

common: new ActionIcon widget which display symbol or image icon according to what is specified in plugin_info
author Goffi <goffi@goffi.org>
date Tue, 01 May 2018 20:48:48 +0200
parents d65a51fa00b9
children a676cb07c1cb
line wrap: on
line diff
--- a/cagou/kv/cagou_widget.kv	Tue May 01 18:28:22 2018 +0200
+++ b/cagou/kv/cagou_widget.kv	Tue May 01 20:48:48 2018 +0200
@@ -27,10 +27,9 @@
     height: dp(44)
     spacing: dp(20)
     padding: dp(5), dp(3), dp(10), dp(3)
-    Image:
+    ActionIcon:
+        plugin_info: root.plugin_info
         size_hint: None, 1
-        source: root.plugin_info['icon_medium']
-        allow_stretch: True
         width: self.height
     Label:
         size_hint: None, 1
@@ -60,11 +59,10 @@
         height: dp(32)
         spacing: dp(3)
         HeaderWidgetCurrent:
-            on_release: root.selector.open(self)
-            source: root.plugin_info['icon_small']
+            plugin_info: root.plugin_info
             size_hint: None, 1
-            allow_stretch: True
             width: self.height
+            on_release: root.selector.open(self)
         TextInput:
             id: header_input
             background_normal: app.expand('{media}/misc/borders/border_hollow_light.png')