openCom-Companion/sbapp/kivymd/uix/anchorlayout.py

48 lines
1.0 KiB
Python
Raw Normal View History

2022-07-07 22:16:10 +02:00
"""
Components/AnchorLayout
=======================
.. versionadded:: 1.0.0
:class:`~kivy.uix.anchorlayout.AnchorLayout` class equivalent. Simplifies working
with some widget properties. For example:
AnchorLayout
------------
2022-10-02 17:16:59 +02:00
.. code-block:: kv
2022-07-07 22:16:10 +02:00
AnchorLayout:
canvas:
Color:
rgba: app.theme_cls.primary_color
Rectangle:
pos: self.pos
size: self.size
2022-10-02 17:16:59 +02:00
MDAnchorLayout
2022-07-07 22:16:10 +02:00
--------------
.. code-block:: kv
2022-10-02 17:16:59 +02:00
MDAnchorLayout:
md_bg_color: app.theme_cls.primary_color
2022-07-07 22:16:10 +02:00
"""
__all__ = ("MDAnchorLayout",)
from kivy.uix.anchorlayout import AnchorLayout
2023-07-10 02:49:58 +02:00
from kivymd.theming import ThemableBehavior
2022-07-07 22:16:10 +02:00
from kivymd.uix import MDAdaptiveWidget
2022-10-02 17:16:59 +02:00
from kivymd.uix.behaviors import DeclarativeBehavior
2022-07-07 22:16:10 +02:00
2023-07-10 02:49:58 +02:00
class MDAnchorLayout(
DeclarativeBehavior, ThemableBehavior, AnchorLayout, MDAdaptiveWidget
):
2022-10-02 17:16:59 +02:00
"""
Anchor layout class. For more information, see in the
:class:`~kivy.uix.anchorlayout.AnchorLayout` class documentation.
"""