mirror of https://github.com/kivy/kivy.git
fixes app build with kv usage/root widget + others typo
This commit is contained in:
parent
8e0bc1568d
commit
9b21638be3
|
@ -9,10 +9,10 @@ Root:
|
|||
size_hint_y: None
|
||||
height: 30
|
||||
Button:
|
||||
text: 'load'
|
||||
text: 'Load'
|
||||
on_release: root.show_load()
|
||||
Button:
|
||||
text: 'save'
|
||||
text: 'Save'
|
||||
on_release: root.show_save()
|
||||
|
||||
BoxLayout:
|
||||
|
@ -36,11 +36,11 @@ Root:
|
|||
size_hint_y: None
|
||||
height: 30
|
||||
Button:
|
||||
text: "cancel"
|
||||
text: "Cancel"
|
||||
on_release: root.cancel()
|
||||
|
||||
Button:
|
||||
text: "load"
|
||||
text: "Load"
|
||||
on_release: root.load(filechooser.path, filechooser.selection)
|
||||
|
||||
<SaveDialog>:
|
||||
|
@ -63,10 +63,10 @@ Root:
|
|||
size_hint_y: None
|
||||
height: 30
|
||||
Button:
|
||||
text: "cancel"
|
||||
text: "Cancel"
|
||||
on_release: root.cancel()
|
||||
|
||||
Button:
|
||||
text: "save"
|
||||
text: "Save"
|
||||
on_release: root.save(filechooser.path, text_input.text)
|
||||
|
||||
|
|
|
@ -28,12 +28,12 @@ class Root(FloatLayout):
|
|||
|
||||
def show_load(self):
|
||||
content = LoadDialog(load=self.load, cancel=self.dismiss_popup)
|
||||
self._popup = Popup(title="load file", content=content, size_hint=(0.9, 0.9))
|
||||
self._popup = Popup(title="Load file", content=content, size_hint=(0.9, 0.9))
|
||||
self._popup.open()
|
||||
|
||||
def show_save(self):
|
||||
content = SaveDialog(save=self.save, cancel=self.dismiss_popup)
|
||||
self._popup = Popup(title="save file", content=content, size_hint=(0.9, 0.9))
|
||||
self._popup = Popup(title="Save file", content=content, size_hint=(0.9, 0.9))
|
||||
self._popup.open()
|
||||
|
||||
def load(self, path, filename):
|
||||
|
|
|
@ -299,9 +299,11 @@ class App(EventDispatcher):
|
|||
If this method returns a widget (tree), it will be used as the root
|
||||
widget and added to the window.
|
||||
|
||||
:return: None or a root :class:`~kivy.uix.widget.Widget` instance
|
||||
:return: None or a root :class:`~kivy.uix.widget.Widget` instance is no
|
||||
self.root exist.
|
||||
'''
|
||||
return Widget()
|
||||
if not self.root:
|
||||
return Widget()
|
||||
|
||||
def build_config(self, config):
|
||||
'''.. versionadded:: 1.0.7
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'''
|
||||
InteractiveLauncher
|
||||
===================
|
||||
Interactive launcher
|
||||
====================
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue