Skip to main content

Mixins that adds margin functionality to Kivy widgets

Project description

garden.layoutmargin

Build Status PyPI version

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 layoutmargin

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-20190911.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

layoutmargin-20190911-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page