Permalink
Browse files

Merge branch 'doc_images' of https://github.com/kivy/kivy

  • Loading branch information...
2 parents 6a0e9fa + 71ebe6c commit 038f8ffad7ea1ae42730d5d2beb695d1d4b2cea2 @akshayaurora akshayaurora committed Sep 30, 2012
@@ -107,6 +107,8 @@ Examples
.. |wdg_desc1| replace:: Usage and Showcase of :class:`Accordion <kivy.uix.accordion>` Widget.
.. |wdg_file2| replace:: asyncimage.py
.. |wdg_desc2| replace:: Usage and Showcase of :class:`AsyncImage <kivy.uix.image.AsyncImage>` Widget.
+.. |wdg_file25| replace:: boxlayout_pos_hint.py
+.. |wdg_desc25| replace:: Showcase of pos_hint under BoxLayout :class:`BoxLayout <kivy.uix.boxlayout>`
.. |wdg_file3| replace:: bubble_test.py
.. |wdg_desc3| replace:: Usage and Showcase of :class:`Bubble <kivy.uix.bubble>` Widget.
.. |wdg_file4| replace:: customcollide.py
@@ -118,7 +120,11 @@ Examples
.. |wdg_file7| replace:: keyboardlistener.py
.. |wdg_desc7| replace:: listen to the keyboard input and spew result to console.
.. |wdg_file8| replace:: label_mipmap.py
-.. |wdg_desc8| replace:: How to use :class:`Label <kivy.uix.label>` widget with mipmap.
+.. |wdg_desc8| replace:: How to use :class:`Label <kivy.uix.label>` widget with
+.. |wdg_file81| replace:: label_with_markup.py
+.. |wdg_desc81| replace:: Useage of :class:`Label <kivy.uix.label>` widget with markup.
+.. |wdg_file82| replace:: popup_with_kv.py
+.. |wdg_desc82| replace:: Useage of :class:`Popup <kivy.uix.popup>` widget with ``kv`` language
.. |wdg_file9| replace:: rstexample.py
.. |wdg_desc9| replace:: Usage and Showcase of :class:`RstDocument <kivy.uix.rst.RstDocument>` Widget.
.. |wdg_file10| replace:: scatter.py
@@ -198,12 +204,15 @@ Examples
+------------+---------------+------------------------+
|- |wdg_dir| | - |wdg_file1| |- |wdg_desc1| |
| | - |wdg_file2| |- |wdg_desc2| |
+| | - |wdg_file25||- |wdg_desc25| |
| | - |wdg_file3| |- |wdg_desc3| |
| | - |wdg_file4| |- |wdg_desc4| |
| | - |wdg_file5| |- |wdg_desc5| |
| | - |wdg_file6| |- |wdg_desc6| |
| | - |wdg_file7| |- |wdg_desc7| |
| | - |wdg_file8| |- |wdg_desc8| |
+| | - |wdg_file81||- |wdg_desc81| |
+| | - |wdg_file82||- |wdg_desc82| |
| | - |wdg_file9| |- |wdg_desc9| |
| | - |wdg_file10||- |wdg_desc10| |
| | - |wdg_file11||- |wdg_desc11| |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -16,6 +16,7 @@
from kivy.clock import Clock
import random
+
class Showcase(FloatLayout):
pass
@@ -60,6 +61,7 @@ def __init__(self, **kwargs):
super(BoxLayoutShowcase, self).__init__(**kwargs)
self.buttons = 0
self.txt = 'horizontal'
+ self.text_size = self.size
Clock.schedule_once(self.add_button, 1)
def add_button(self, *l):
@@ -71,7 +73,10 @@ def add_button(self, *l):
self.txt = self.blayout.orientation = 'horizontal'
else:
self.txt = self.blayout.orientation = 'vertical'
- self.blayout.add_widget(Button(text = self.txt))
+
+ btn = Button(text=self.txt, halign='center', valign='middle')
+ btn.bind(size=btn.setter('text_size'))
+ self.blayout.add_widget(btn)
Clock.schedule_once(self.add_button, 1)
@@ -87,9 +92,9 @@ def add_button(self, *l):
if self.buttons > 5:
self.buttons = 0
self.flayout.clear_widgets()
- self.flayout.add_widget(Button(text = 'no restrictions\n what so ever',
- size_hint = (None, None), size = (150, 40),
- pos_hint = {'x':random.random(), 'y': random.random()}))
+ self.flayout.add_widget(Button(text='no restrictions\n what so ever',
+ size_hint=(None, None), size=(150, 40),
+ pos_hint={'x': random.random(), 'y': random.random()}))
Clock.schedule_once(self.add_button, 1)
@@ -106,7 +111,7 @@ def __init__(self, **kwargs):
def add_button(self, *l):
self.buttons += 1
- if self.buttons > 20:
+ if self.buttons > 10:
self.buttons = 0
self.glayout.clear_widgets()
if self.txt == "rows = 3":
@@ -117,7 +122,7 @@ def add_button(self, *l):
self.glayout.rows = 3
self.glayout.cols = 7
self.txt = "rows = 3"
- self.glayout.add_widget(Button(text = self.txt))
+ self.glayout.add_widget(Button(text=self.txt))
Clock.schedule_once(self.add_button, 1)
@@ -157,9 +162,11 @@ def increment_value(self, dt):
class ComplexWidgets(FloatLayout):
pass
+
class TreeViewWidgets(FloatLayout):
pass
+
class ShowcaseApp(App):
def on_select_node(self, instance, value):

0 comments on commit 038f8ff

Please sign in to comment.