comparison src/cagou/plugins/plugin_wid_chat.py @ 102:20251d926cc2

chat: fixed bad size_hint setting on XHTML
author Goffi <goffi@goffi.org>
date Thu, 05 Jan 2017 20:36:41 +0100
parents d7447c585603
children c601e3d40342
comparison
equal deleted inserted replaced
101:d5ede9281e4c 102:20251d926cc2
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.stacklayout import StackLayout 27 from kivy.uix.stacklayout import StackLayout
28 from kivy.uix.textinput import TextInput 28 from kivy.uix.textinput import TextInput
29 from kivy.uix.label import Label 29 from kivy.uix.label import Label
30 from kivy.uix.image import AsyncImage
31 from kivy.metrics import dp 30 from kivy.metrics import dp
32 from kivy.utils import escape_markup 31 from kivy.utils import escape_markup
33 from kivy import properties 32 from kivy import properties
34 from sat_frontends.quick_frontend import quick_widgets 33 from sat_frontends.quick_frontend import quick_widgets
35 from sat_frontends.quick_frontend import quick_chat 34 from sat_frontends.quick_frontend import quick_chat
36 from sat_frontends.tools import jid, css_color, strings as sat_strings 35 from sat_frontends.tools import jid, css_color, strings as sat_strings
37 from cagou.core import cagou_widget 36 from cagou.core import cagou_widget
38 from cagou.core.image import Image 37 from cagou.core.image import Image, AsyncImage
39 from cagou import G 38 from cagou import G
40 from xml.etree import ElementTree as ET 39 from xml.etree import ElementTree as ET
41 import webbrowser 40 import webbrowser
42 41
43 42
211 wid.text_size = None, None 210 wid.text_size = None, None
212 wid.texture_update() 211 wid.texture_update()
213 wid.width = wid.texture_size[0] 212 wid.width = wid.texture_size[0]
214 self.content_width = wid.width + self.padding[0] + self.padding[2] 213 self.content_width = wid.width + self.padding[0] + self.padding[2]
215 else: 214 else:
216 wid.size_hint(1, None) 215 wid.size_hint = (1, None)
217 wid.height = 100 216 wid.height = 100
218 self.content_width = self.width 217 self.content_width = self.width
219 else: 218 else:
220 self._do_complexe_sizing(width) 219 self._do_complexe_sizing(width)
221 220