2022-07-07 14:16:10 -06:00
|
|
|
"""
|
|
|
|
Components/StackLayout
|
|
|
|
======================
|
|
|
|
|
|
|
|
:class:`~kivy.uix.stacklayout.StackLayout` class equivalent. Simplifies working
|
|
|
|
with some widget properties. For example:
|
|
|
|
|
|
|
|
StackLayout
|
|
|
|
-----------
|
|
|
|
|
2022-10-02 09:16:59 -06:00
|
|
|
.. code-block:: kv
|
2022-07-07 14:16:10 -06:00
|
|
|
|
|
|
|
StackLayout:
|
|
|
|
size_hint_y: None
|
|
|
|
height: self.minimum_height
|
|
|
|
|
|
|
|
canvas:
|
|
|
|
Color:
|
|
|
|
rgba: app.theme_cls.primary_color
|
|
|
|
Rectangle:
|
|
|
|
pos: self.pos
|
|
|
|
size: self.size
|
|
|
|
|
|
|
|
MDStackLayout
|
|
|
|
-------------
|
|
|
|
|
2022-10-02 09:16:59 -06:00
|
|
|
.. code-block:: kv
|
2022-07-07 14:16:10 -06:00
|
|
|
|
|
|
|
MDStackLayout:
|
|
|
|
adaptive_height: True
|
|
|
|
md_bg_color: app.theme_cls.primary_color
|
|
|
|
|
|
|
|
Available options are:
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
- adaptive_height_
|
|
|
|
- adaptive_width_
|
|
|
|
- adaptive_size_
|
|
|
|
|
|
|
|
.. adaptive_height:
|
|
|
|
adaptive_height
|
|
|
|
---------------
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
adaptive_height: True
|
|
|
|
|
|
|
|
Equivalent
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
size_hint_y: None
|
|
|
|
height: self.minimum_height
|
|
|
|
|
|
|
|
.. adaptive_width:
|
|
|
|
adaptive_width
|
|
|
|
--------------
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
adaptive_width: True
|
|
|
|
|
|
|
|
Equivalent
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
size_hint_x: None
|
|
|
|
width: self.minimum_width
|
|
|
|
|
|
|
|
.. adaptive_size:
|
|
|
|
adaptive_size
|
|
|
|
-------------
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
adaptive_size: True
|
|
|
|
|
|
|
|
Equivalent
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
size_hint: None, None
|
|
|
|
size: self.minimum_size
|
|
|
|
"""
|
|
|
|
|
2022-10-02 09:16:59 -06:00
|
|
|
__all__ = ("MDStackLayout",)
|
|
|
|
|
2022-07-07 14:16:10 -06:00
|
|
|
from kivy.uix.stacklayout import StackLayout
|
|
|
|
|
2023-07-09 18:49:58 -06:00
|
|
|
from kivymd.theming import ThemableBehavior
|
2022-07-07 14:16:10 -06:00
|
|
|
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
|
|
|
|
|
|
|
|
2023-07-09 18:49:58 -06:00
|
|
|
class MDStackLayout(
|
|
|
|
DeclarativeBehavior, ThemableBehavior, StackLayout, MDAdaptiveWidget
|
|
|
|
):
|
2022-10-02 09:16:59 -06:00
|
|
|
"""
|
|
|
|
Stack layout class. For more information, see in the
|
|
|
|
:class:`~kivy.uix.stacklayout.StackLayout` class documentation.
|
|
|
|
"""
|