diff cagou/kv/root_widget.kv @ 250:ff1efdeff53f

core: notifs can now have a custom icon and be clickable: - new host.doAction method, to open a specific widget/target (chat only for now) - when adding a notif, symbol can now be specified - an action can be linked to a notification - notifs design improvments - plugins contact list and chat use the new doAction/notif action - if None is given as old widget in SwitchWidget, the new getWidgetToSwitch method is used to select one to switch.
author Goffi <goffi@goffi.org>
date Sat, 26 Jan 2019 20:24:48 +0100
parents cf61a011f731
children 7d5297984191
line wrap: on
line diff
--- a/cagou/kv/root_widget.kv	Sat Jan 26 20:24:48 2019 +0100
+++ b/cagou/kv/root_widget.kv	Sat Jan 26 20:24:48 2019 +0100
@@ -33,7 +33,7 @@
 <NoteDrop>:
     orientation: 'horizontal'
     size_hint: 1, None
-    height: label.height
+    height: max(label.height, dp(45))
     symbol: symbol
     canvas.before:
         BorderImage:
@@ -45,14 +45,14 @@
         width: dp(20)
     Symbol:
         id: symbol
-        size_hint: None, None
+        size_hint: None, 1
         width: dp(30)
-        height: label.height
         padding_y: dp(10)
         valign: 'top'
         haligh: 'right'
-        symbol: root.level
+        symbol: root.symbol or root.level
         color:
+            C.COLOR_PRIM_LIGHT if root.symbol is None else \
             {C.XMLUI_DATA_LVL_INFO: app.c_prim_light,\
             C.XMLUI_DATA_LVL_WARNING: C.COLOR_WARNING,\
             C.XMLUI_DATA_LVL_ERROR: C.COLOR_ERROR}[root.level]