mirror of https://github.com/kivy/kivy.git
Merge pull request #412 from akshayaurora/bubble
Remove redundant `background_texture`, this also fixes updation of textu...
This commit is contained in:
commit
625528db29
|
@ -33,7 +33,7 @@
|
|||
rgba: self.parent.background_color if self.parent else (1, 1, 1, 1)
|
||||
BorderImage:
|
||||
border: self.parent.border if self.parent else (16, 16, 16, 16)
|
||||
texture: root.parent.background_texture if root.parent else None
|
||||
texture: root.parent._bk_img.texture if root.parent else None
|
||||
size: self.size
|
||||
pos: self.pos
|
||||
|
||||
|
|
|
@ -131,13 +131,6 @@ class Bubble(GridLayout):
|
|||
default to 'bottom_mid'.
|
||||
'''
|
||||
|
||||
background_texture = ObjectProperty(None)
|
||||
'''Specifies the background texture of the bubble
|
||||
|
||||
:data:`background_texture` is a :class:`~kivy.properties.ObjectProperty`,
|
||||
default to 'None'.
|
||||
'''
|
||||
|
||||
content = ObjectProperty(None)
|
||||
'''This is the object where the main content of the bubble is held
|
||||
|
||||
|
@ -165,12 +158,8 @@ class Bubble(GridLayout):
|
|||
self.content = content = BubbleContent(parent=self)
|
||||
super(Bubble, self).__init__(**kwargs)
|
||||
self.add_widget(content)
|
||||
self._bk_img.bind(on_texture=self._on_texture)
|
||||
self.on_arrow_pos()
|
||||
|
||||
def _on_texture(self, *l):
|
||||
self.background_texture = self._bk_img.texture
|
||||
|
||||
def add_widget(self, *l):
|
||||
content = self.content
|
||||
if content is None:
|
||||
|
|
Loading…
Reference in New Issue