comparison cagou/plugins/plugin_wid_chat.py @ 185:ab3f5173ef5c

chat, simple XHTML: font size adjustement
author Goffi <goffi@goffi.org>
date Fri, 11 May 2018 20:07:17 +0200
parents c63922860f80
children a826c70beda2
comparison
equal deleted inserted replaced
184:c63922860f80 185:ab3f5173ef5c
23 from sat.core.i18n import _ 23 from sat.core.i18n import _
24 from cagou.core.constants import Const as C 24 from cagou.core.constants import Const as C
25 from kivy.uix.boxlayout import BoxLayout 25 from kivy.uix.boxlayout import BoxLayout
26 from kivy.uix.gridlayout import GridLayout 26 from kivy.uix.gridlayout import GridLayout
27 from kivy.uix.textinput import TextInput 27 from kivy.uix.textinput import TextInput
28 from kivy.metrics import dp 28 from kivy.metrics import sp, dp
29 from kivy import properties 29 from kivy import properties
30 from sat_frontends.quick_frontend import quick_widgets 30 from sat_frontends.quick_frontend import quick_widgets
31 from sat_frontends.quick_frontend import quick_chat 31 from sat_frontends.quick_frontend import quick_chat
32 from sat_frontends.tools import jid 32 from sat_frontends.tools import jid
33 from cagou.core import cagou_widget 33 from cagou.core import cagou_widget
63 mess_data = properties.ObjectProperty() 63 mess_data = properties.ObjectProperty()
64 mess_xhtml = properties.ObjectProperty() 64 mess_xhtml = properties.ObjectProperty()
65 mess_padding = (dp(5), dp(5)) 65 mess_padding = (dp(5), dp(5))
66 avatar = properties.ObjectProperty() 66 avatar = properties.ObjectProperty()
67 delivery = properties.ObjectProperty() 67 delivery = properties.ObjectProperty()
68 font_size = properties.NumericProperty(sp(12))
68 69
69 def __init__(self, **kwargs): 70 def __init__(self, **kwargs):
70 # self must be registered in widgets before kv is parsed 71 # self must be registered in widgets before kv is parsed
71 kwargs['mess_data'].widgets.add(self) 72 kwargs['mess_data'].widgets.add(self)
72 super(MessageWidget, self).__init__(**kwargs) 73 super(MessageWidget, self).__init__(**kwargs)