diff src/cagou/kv/root_widget.kv @ 33:c21d1be2e54c

core: XMLUI notifications coming from backend are handled: when a notification from backend is coming, it's added to a notification icon (on the right for important notifications which need user action, while left icon is used for notes). If user click on the notification icon, the XMLUI replace the main widget with a rise animation. When action is finished, ui is closed with a fall out animation.
author Goffi <goffi@goffi.org>
date Sun, 21 Aug 2016 21:41:52 +0200
parents 8b5827c43155
children bd3ecac18870
line wrap: on
line diff
--- a/src/cagou/kv/root_widget.kv	Sun Aug 21 17:49:14 2016 +0200
+++ b/src/cagou/kv/root_widget.kv	Sun Aug 21 21:41:52 2016 +0200
@@ -49,6 +49,7 @@
 
 <RootHeadWidget>:
     manager: manager
+    notifs_icon: notifs_icon
     size_hint: 1, None
     height: 35
     IconButton:
@@ -58,3 +59,9 @@
         on_release: root.notes_drop.open(self) if root.notes else None
     ScreenManager:
         id: manager
+    NotifsIcon:
+        id: notifs_icon
+        source: app.expand("{media}/icons/muchoslava/png/cagou_profil_bleu_32.png") if self.notifs else app.expand("{media}/misc/black.png")
+        size_hint: None, 1
+        width: self.texture_size[0]
+