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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file layoutmargin-20190911.tar.gz.

File metadata

  • Download URL: layoutmargin-20190911.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for layoutmargin-20190911.tar.gz
Algorithm Hash digest
SHA256 0643b03abe01fb51f89c757e4ea1a354e77920fa6cd60816acb4466c7284362f
MD5 5dd15c29314d4213119dae2904a7538d
BLAKE2b-256 cd027a75743f5bf4356d5c26cad861ad7da30f02d7c7d2c9c2a22d4501725f7c

See more details on using hashes here.

File details

Details for the file layoutmargin-20190911-py3-none-any.whl.

File metadata

  • Download URL: layoutmargin-20190911-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for layoutmargin-20190911-py3-none-any.whl
Algorithm Hash digest
SHA256 9ff709ad5728316dbe51638022a1e09a0f924a0615dd3cd326211e02d9033373
MD5 20fa5d32ad6ae5b7e54bdd3b3a01d9c9
BLAKE2b-256 021bc046b09c063ee9773039661159fe3a843e1ca68f6f274866362301311f18

See more details on using hashes here.

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