Skip to content

Commit ca9eb0b

Browse files
authored
Merge pull request kivy#5035 from rafalo1333/coverimage_better_docs
Added KV example for CoverBehavior.
2 parents 1ef5f2f + 88e9e52 commit ca9eb0b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

kivy/uix/behaviors/cover.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
Example
1616
-------
1717
18-
The following example adds cover behavior to an image::
18+
The following examples add cover behavior to an image::
19+
20+
In python:
21+
22+
.. code-block:: python
1923
2024
from kivy.app import App
2125
from kivy.uix.behaviors import CoverBehavior
@@ -38,6 +42,16 @@ def build(self):
3842
3943
MainApp().run()
4044
45+
In Kivy Language:
46+
47+
.. code-block:: kv
48+
49+
CoverImage:
50+
source: 'image.png'
51+
52+
<CoverImage@CoverBehavior+Image>:
53+
reference_size: self.texture_size
54+
4155
See :class:`~kivy.uix.behaviors.cover.CoverBehavior` for details.
4256
'''
4357

0 commit comments

Comments
 (0)