Skip to main content

Mixins that adds margin functionality to Kivy widgets

Project description

garden.layoutmargin

Build Status

A set of mixins (MarginLayout, AddMargin) that adds margin functionality to Kivy widgets.

demo

How to use

@ .py subclasses:

from layoutmargin import AddMargin, MarginLayout


class MarginBoxLayout(MarginLayout, BoxLayout):
    pass


class MarginButton(AddMargin, Button):
    pass

@ .kv layout:

MarginBoxLayout:

    MarginButton:
        margin: (30, 10, 30, 10) # integer / float

    MarginButton:
        margin: ("10%", "10%", "10%", "10%") # percentage of total widget size

    MarginButton:
        margin: (30, "10%", 30, "10%") # mixed

Run the demo

make run

Install

pip install https://github.com/AndreMiras/garden.layoutmargin/archive/develop.zip

Credits

Forked from Enteleform/-Kivy-MarginLayout-Demo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

layoutmargin-0.0.0.tar.gz (3.3 kB view hashes)

Uploaded source

Built Distribution

layoutmargin-0.0.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page