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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0643b03abe01fb51f89c757e4ea1a354e77920fa6cd60816acb4466c7284362f
|
|
| MD5 |
5dd15c29314d4213119dae2904a7538d
|
|
| BLAKE2b-256 |
cd027a75743f5bf4356d5c26cad861ad7da30f02d7c7d2c9c2a22d4501725f7c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ff709ad5728316dbe51638022a1e09a0f924a0615dd3cd326211e02d9033373
|
|
| MD5 |
20fa5d32ad6ae5b7e54bdd3b3a01d9c9
|
|
| BLAKE2b-256 |
021bc046b09c063ee9773039661159fe3a843e1ca68f6f274866362301311f18
|