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 https://github.com/AndreMiras/garden.layoutmargin/archive/develop.zip
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-0.0.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for layoutmargin-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c23c234d70d13e2076d3ea61aabbfbac0bd6fbe9c710587b168edda471557c23 |
|
MD5 | 7acb0eda3e0de9b88ee60152384fd218 |
|
BLAKE2b-256 | e474403b64aec4ae445e95cff0abdb55650b1821553cbce1dd882ef80009da65 |