2024-09-15 12:12:16 +00:00
|
|
|
"""
|
|
|
|
Components/FloatLayout
|
|
|
|
======================
|
|
|
|
|
|
|
|
:class:`~kivy.uix.floatlayout.FloatLayout` class equivalent. Simplifies working
|
|
|
|
with some widget properties. For example:
|
|
|
|
|
|
|
|
FloatLayout
|
|
|
|
-----------
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
FloatLayout:
|
|
|
|
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: self.pos
|
|
|
|
size: self.size
|
|
|
|
radius: [25, 0, 0, 0]
|
|
|
|
|
|
|
|
MDFloatLayout
|
|
|
|
-------------
|
|
|
|
|
|
|
|
.. code-block:: kv
|
|
|
|
|
|
|
|
MDFloatLayout:
|
|
|
|
radius: [25, 0, 0, 0]
|
2024-09-15 17:57:02 +00:00
|
|
|
md_bg_color: app.theme_cls.primaryColor
|
2024-09-15 12:12:16 +00:00
|
|
|
|
|
|
|
.. Warning:: For a :class:`~kivy.uix.floatlayout.FloatLayout`, the
|
|
|
|
``minimum_size`` attributes are always 0, so you cannot use
|
|
|
|
``adaptive_size`` and related options.
|
|
|
|
"""
|
|
|
|
|
|
|
|
from kivy.uix.floatlayout import FloatLayout
|
|
|
|
|
|
|
|
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 MDFloatLayout(
|
2024-09-15 17:57:02 +00:00
|
|
|
DeclarativeBehavior,
|
|
|
|
ThemableBehavior,
|
|
|
|
BackgroundColorBehavior,
|
|
|
|
FloatLayout,
|
|
|
|
MDAdaptiveWidget,
|
2024-09-15 12:12:16 +00:00
|
|
|
):
|
|
|
|
"""
|
2024-09-15 17:57:02 +00:00
|
|
|
Float 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.floatlayout.FloatLayout` and
|
|
|
|
:class:`~kivymd.uix.MDAdaptiveWidget`
|
|
|
|
classes documentation.
|
2024-09-15 12:12:16 +00:00
|
|
|
"""
|