Sideband/sbapp/kivymd/uix/anchorlayout.py

45 lines
957 B
Python
Raw Normal View History

2022-07-07 14:16:10 -06: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 09:16:59 -06:00
.. code-block:: kv
2022-07-07 14:16:10 -06:00
AnchorLayout:
canvas:
Color:
rgba: app.theme_cls.primary_color
Rectangle:
pos: self.pos
size: self.size
2022-10-02 09:16:59 -06:00
MDAnchorLayout
2022-07-07 14:16:10 -06:00
--------------
.. code-block:: kv
2022-10-02 09:16:59 -06:00
MDAnchorLayout:
md_bg_color: app.theme_cls.primary_color
2022-07-07 14:16:10 -06:00
"""
__all__ = ("MDAnchorLayout",)
from kivy.uix.anchorlayout import AnchorLayout
from kivymd.uix import MDAdaptiveWidget
2022-10-02 09:16:59 -06:00
from kivymd.uix.behaviors import DeclarativeBehavior
2022-07-07 14:16:10 -06:00
2022-10-02 09:16:59 -06:00
class MDAnchorLayout(DeclarativeBehavior, AnchorLayout, MDAdaptiveWidget):
"""
Anchor layout class. For more information, see in the
:class:`~kivy.uix.anchorlayout.AnchorLayout` class documentation.
"""