Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit d72cd2fd00a19e99c7e238f193e27551679b981a 2 parents 0d28edf + f8b6486
@tito tito authored
View
2  doc/sources/gettingstarted/events.rst
@@ -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.
View
2  doc/sources/gettingstarted/intro.rst
@@ -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
View
BIN  doc/sources/images/anchorlayout.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  doc/sources/images/boxlayout.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  doc/sources/images/floatlayout.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  doc/sources/images/gridlayout.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  doc/sources/images/stacklayout.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
13 kivy/uix/anchorlayout.py
@@ -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
10 kivy/uix/boxlayout.py
@@ -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
26 kivy/uix/floatlayout.py
@@ -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
10 kivy/uix/gridlayout.py
@@ -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
10 kivy/uix/stacklayout.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.