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

45 lines
957 B
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
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
2022-10-02 17:16:59 +02:00
class MDAnchorLayout(DeclarativeBehavior, AnchorLayout, MDAdaptiveWidget):
"""
Anchor layout class. For more information, see in the
:class:`~kivy.uix.anchorlayout.AnchorLayout` class documentation.
"""