Permalink
Browse files

Merge branch 'master' of ssh://github.com/kivy/kivy

  • Loading branch information...
2 parents 0d28edf + f8b6486 commit d72cd2fd00a19e99c7e238f193e27551679b981a @tito tito committed Apr 25, 2012
@@ -34,5 +34,5 @@ the easiest way to do that is to call **super** ::
return False
print 'you touched me!'
-Get more familiar with events by reading the following `event <file:///mnt/MyData/code/multitouch/MT__code/akfork/kivy/doc/build/html/guide/events.html#events>` documentation.
+Get more familiar with events by reading the following `event <http://kivy.org/docs/guide/events.html#events>`_ documentation.
@@ -7,7 +7,7 @@ Introduction
Creating Kivy apps is fun and enriching. This guide provides the perfect starting point for app development.
-.. note
+.. note::
Kivy is based on Python, `basic <http://docs.python.org/tutorial/>`_ `python <http://docs.python.org/tutorial/>`_ `knowlege <http://learnpythonthehardway.org/>`_ is assumed in this introduction.
.. image:: ../images/gs-introduction.png
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.
View
@@ -2,13 +2,24 @@
Anchor Layout
=============
+.. only:: html
+
+ .. image:: images/anchorlayout.gif
+ :align: right
+
+.. only:: latex
+
+ .. image:: images/anchorlayout.png
+ :align: right
+
:class:`AnchorLayout` aligns children to a border (top, bottom, left, right)
or center.
To draw a button in the lower-right corner ::
- layout = AnchorLayout(anchor_x='right', anchor_y='bottom')
+ layout = AnchorLayout(
+ anchor_x='right', anchor_y='bottom')
btn = Button(text='Hello World')
layout.add_widget(btn)
View
@@ -2,6 +2,16 @@
Box Layout
==========
+.. only:: html
+
+ .. image:: images/boxlayout.gif
+ :align: right
+
+.. only:: latex
+
+ .. image:: images/boxlayout.png
+ :align: right
+
:class:`BoxLayout` arranges children in a vertical or horizontal box.
To position widgets above/below each other, use a vertical BoxLayout::
View
@@ -5,19 +5,35 @@
The :class:`FloatLayout` class will just honor the :data:`Widget.pos_hint` and
:data:`Widget.size_hint` attributes.
+.. only:: html
+
+ .. image:: images/floatlayout.gif
+ :align: right
+
+.. only:: latex
+
+ .. image:: images/floatlayout.png
+ :align: right
For example, if you create a FloatLayout with size of (300, 300)::
layout = FloatLayout(size=(300, 300))
- # by default, all widgets have size_hint=(1, 1)
- # So this button will have the same size as layout
+ # By default, all widgets have size_hint=(1, 1)
+ # So this button will have the same size as
+ # the layout
button = Button(text='Hello world')
layout.add_widget(button)
- # if you want to create a button to be the 50% of the layout width, and 25%
- # of the layout height, and set position to 20, 20, you can do
- button = Button(text='Hello world', size_hint=(.5, .25), pos=(20, 20))
+ # To create a button of 50% width and 25%
+ # height of the layout and positioned at
+ # 20, 20, you can do
+ button = Button(
+ text='Hello world',
+ size_hint=(.5, .25),
+ pos=(20, 20))
+
+::
# If you want to create a button that will always be the size of layout -
# 20% each sides
View
@@ -2,6 +2,16 @@
Grid Layout
===========
+.. only:: html
+
+ .. image:: images/gridlayout.gif
+ :align: right
+
+.. only:: latex
+
+ .. image:: images/gridlayout.png
+ :align: right
+
.. versionadded:: 1.0.4
:class:`GridLayout` arranges children in a matrix. It takes the available space
View
@@ -2,6 +2,16 @@
Stack Layout
============
+.. only:: html
+
+ .. image:: images/stacklayout.gif
+ :align: right
+
+.. only:: latex
+
+ .. image:: images/stacklayout.png
+ :align: right
+
.. versionadded:: 1.0.5
:class:`StackLayout` arranges children vertically or horizontally, as many

0 comments on commit d72cd2f

Please sign in to comment.