From 25be28646bb09a56d4baf8c747f542adb7980dda Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Sat, 21 Jul 2012 22:45:51 +0200 Subject: [PATCH] fix doc and remove __init__ --- kivy/uix/popup.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/kivy/uix/popup.py b/kivy/uix/popup.py index 8c806e57d..18b8f4695 100644 --- a/kivy/uix/popup.py +++ b/kivy/uix/popup.py @@ -15,6 +15,11 @@ Remember that the default size of a Widget is size_hint=(1, 1). If you don't want your popup to be fullscreen, deactivate the size_hint and use a specific size attribute. + +.. versionchanged:: 1.4.0 + The :class:`Popup` class now inherits from :class:`~kivy.uix.modalview.ModalView`. + The :class:`Popup` offers a default layout with a title and a separation bar. + Examples -------- @@ -99,6 +104,14 @@ class Popup(ModalView): title'. ''' + background = StringProperty( + 'atlas://data/images/defaulttheme/popup-background') + '''Background image of the view used for the view background. + + :data:`background` is an :class:`~kivy.properties.StringProperty`, + default to 'atlas://data/images/defaulttheme/popup-background' + ''' + content = ObjectProperty(None) '''Content of the popup that is displayed just under the title. @@ -128,10 +141,6 @@ class Popup(ModalView): _container = ObjectProperty(None) - def __init__(self, **kwargs): - kwargs.setdefault('background', 'atlas://data/images/defaulttheme/popup-background') - super(Popup, self).__init__(**kwargs) - def add_widget(self, widget): if self._container: if self.content: