Skip to content

Commit

Permalink
Merge pull request kivy#5035 from rafalo1333/coverimage_better_docs
Browse files Browse the repository at this point in the history
Added KV example for CoverBehavior.
  • Loading branch information
rnixx authored Mar 4, 2017
2 parents 1ef5f2f + 88e9e52 commit ca9eb0b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion kivy/uix/behaviors/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
Example
-------
The following example adds cover behavior to an image::
The following examples add cover behavior to an image::
In python:
.. code-block:: python
from kivy.app import App
from kivy.uix.behaviors import CoverBehavior
Expand All @@ -38,6 +42,16 @@ def build(self):
MainApp().run()
In Kivy Language:
.. code-block:: kv
CoverImage:
source: 'image.png'
<CoverImage@CoverBehavior+Image>:
reference_size: self.texture_size
See :class:`~kivy.uix.behaviors.cover.CoverBehavior` for details.
'''

Expand Down

0 comments on commit ca9eb0b

Please sign in to comment.