comparison 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
comparison
equal deleted inserted replaced
249:5d69e4cab925 250:ff1efdeff53f
31 shorten_from: 'right' 31 shorten_from: 'right'
32 32
33 <NoteDrop>: 33 <NoteDrop>:
34 orientation: 'horizontal' 34 orientation: 'horizontal'
35 size_hint: 1, None 35 size_hint: 1, None
36 height: label.height 36 height: max(label.height, dp(45))
37 symbol: symbol 37 symbol: symbol
38 canvas.before: 38 canvas.before:
39 BorderImage: 39 BorderImage:
40 pos: self.pos 40 pos: self.pos
41 size: self.size 41 size: self.size
43 Widget: 43 Widget:
44 size_hint: None, 1 44 size_hint: None, 1
45 width: dp(20) 45 width: dp(20)
46 Symbol: 46 Symbol:
47 id: symbol 47 id: symbol
48 size_hint: None, None 48 size_hint: None, 1
49 width: dp(30) 49 width: dp(30)
50 height: label.height
51 padding_y: dp(10) 50 padding_y: dp(10)
52 valign: 'top' 51 valign: 'top'
53 haligh: 'right' 52 haligh: 'right'
54 symbol: root.level 53 symbol: root.symbol or root.level
55 color: 54 color:
55 C.COLOR_PRIM_LIGHT if root.symbol is None else \
56 {C.XMLUI_DATA_LVL_INFO: app.c_prim_light,\ 56 {C.XMLUI_DATA_LVL_INFO: app.c_prim_light,\
57 C.XMLUI_DATA_LVL_WARNING: C.COLOR_WARNING,\ 57 C.XMLUI_DATA_LVL_WARNING: C.COLOR_WARNING,\
58 C.XMLUI_DATA_LVL_ERROR: C.COLOR_ERROR}[root.level] 58 C.XMLUI_DATA_LVL_ERROR: C.COLOR_ERROR}[root.level]
59 Label: 59 Label:
60 id: label 60 id: label