Mixins that adds margin functionality to Kivy widgets
Project description
garden.layoutmargin
A set of mixins (MarginLayout
, AddMargin
) that adds margin
functionality to Kivy widgets.
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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for layoutmargin-20190911-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ff709ad5728316dbe51638022a1e09a0f924a0615dd3cd326211e02d9033373 |
|
MD5 | 20fa5d32ad6ae5b7e54bdd3b3a01d9c9 |
|
BLAKE2b-256 | 021bc046b09c063ee9773039661159fe3a843e1ca68f6f274866362301311f18 |