test-kivy-app/kivy_venv/lib/python3.11/site-packages/kivymd/uix/relativelayout.py

59 lines
1.4 KiB
Python
Raw Normal View History

2024-09-15 12:12:16 +00:00
"""
Components/RelativeLayout
=========================
:class:`~kivy.uix.relativelayout.RelativeLayout` class equivalent.
Simplifies working with some widget properties. For example:
RelativeLayout
--------------
.. code-block:: kv
RelativeLayout:
canvas:
Color:
2024-09-15 17:57:02 +00:00
rgba: app.theme_cls.primaryColor
2024-09-15 12:12:16 +00:00
RoundedRectangle:
pos: (0, 0)
size: self.size
radius: [25, ]
MDRelativeLayout
----------------
.. code-block:: kv
MDRelativeLayout:
radius: [25, ]
2024-09-15 17:57:02 +00:00
md_bg_color: app.theme_cls.primaryColor
2024-09-15 12:12:16 +00:00
"""
2024-09-15 17:57:02 +00:00
__all__ = ("MDRelativeLayout",)
2024-09-15 12:12:16 +00:00
from kivy.uix.relativelayout import RelativeLayout
from kivymd.theming import ThemableBehavior
from kivymd.uix import MDAdaptiveWidget
2024-09-15 17:57:02 +00:00
from kivymd.uix.behaviors import DeclarativeBehavior, BackgroundColorBehavior
2024-09-15 12:12:16 +00:00
class MDRelativeLayout(
2024-09-15 17:57:02 +00:00
DeclarativeBehavior,
ThemableBehavior,
BackgroundColorBehavior,
RelativeLayout,
MDAdaptiveWidget,
2024-09-15 12:12:16 +00:00
):
"""
2024-09-15 17:57:02 +00:00
Relative layout class.
For more information see in the
:class:`~kivymd.uix.behaviors.declarative_behavior.DeclarativeBehavior` and
:class:`~kivymd.theming.ThemableBehavior` and
:class:`~kivymd.uix.behaviors.backgroundcolor_behavior.BackgroundColorBehavior` and
:class:`~kivy.uix.relativelayout.RelativeLayout` and
:class:`~kivymd.uix.MDAdaptiveWidget`
classes documentation.
2024-09-15 12:12:16 +00:00
"""