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.

Files for layoutmargin, version 20190911
Filename, size File type Python version Upload date Hashes
Filename, size layoutmargin-20190911-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size layoutmargin-20190911.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page