Skip to content

Commit

Permalink
import splittergrid as a flower
Browse files Browse the repository at this point in the history
  • Loading branch information
tshirtman committed Feb 17, 2020
1 parent 2f59f94 commit 35468e5
Show file tree
Hide file tree
Showing 17 changed files with 435 additions and 49 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v0.1.0 Initial release
v1.0.0 Initial release
======================

Added the demo flower project.
Extracted the widget from ncis, and fixed some orientation values.
64 changes: 47 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,69 @@
kivy-garden demo flower
========================
SplitterGrid
============

[![Github Build Status](https://github.com/kivy-garden/flower/workflows/Garden%20flower/badge.svg)](https://github.com/kivy-garden/flower/actions)
[![Github Build Status](https://github.com/kivy-garden/splittergrid/workflows/Garden%20flower/badge.svg)](https://github.com/kivy-garden/flower/actions)

A kivy garden flower that shows how to add flowers.
A GridLayout-like widget, that allows the user to manually change the relative
sizes of each collumn and row. If the widget is resized, the preferences will
be conserved relalively (a column resized to 10% of the total width will stay
10% of the total width). As with GridLayout, either a number column or a number
of rows must be set, if both are set, then `cols` is used.

See https://kivy-garden.github.io/flower/ for the rendered flower docs.
It also allows setting the order of filling through the `orientation` property,
all the modes you could hope for are implemented:

Please see the garden [instructions](https://kivy-garden.github.io) for how to use kivy garden flowers.
tb-lr, top to bottom, left to right, which means the first column
will be filled from top to bottom, then the second column, etc.
![tb-lr](captures/tb-lr.png)

CI
--
bt-lr: bottom to top, left to right
![bt-lr](captures/bt-lr.png)

Every push or pull request run the [GitHub Action](https://github.com/kivy-garden/flower/actions) CI.
It tests the code on various OS and also generates wheels that can be released on PyPI upon a
tag. Docs are also generated and uploaded to the repo as well as artifacts of the CI.
tb-rl: top to bottom, right to left
![tb-rl](captures/tb-rl.png)

bt-rl, bottom to top, right to left
![bt-rl](captures/bt-rl.png)

TODO
-------
lr-tb: left to right, top to bottom
![lr-tb](captures/lr-tb.png)

lr-bt: left to right, top to bottom
![lr-bt](captures/lr-bt.png)

rl-tb: right to left, top to bottom
![rl-tb](captures/rl-tb.png)

rl-bt: rigth to left, bottom to top
![rl-bt](captures/rl-bt.png)

The margin between each cell can be dragged by the user, resizing the
corresponding row or column (or both, if you drag from an intersection).
`min_col_width` and `min_row_height` allowing to set constraints on user
interaction. On desktop, the mouse cursor is set to arrows indicating the
possibility of resizing when hovering a margin.

![resizing](captures/resize.png)

This layout doesn't use `size_hint` or `size_hint_min` and `size_hint_max`
properties of its children.

The module can be ran standalone and will display a basic demonstration of the
layout.

* add your code

Contributing
--------------
------------

Check out our [contribution guide](CONTRIBUTING.md) and feel free to improve the flower.

License
---------
-------

This software is released under the terms of the MIT License.
Please see the [LICENSE.txt](LICENSE.txt) file.

How to release
===============
==============

See the garden [instructions](https://kivy-garden.github.io/#makingareleaseforyourflower) for how to make a new release.
Binary file added captures/bt-lr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/bt-rl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/lr-bt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/lr-tb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/resize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/rl-bt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/rl-tb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/tb-lr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/tb-rl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 0 additions & 22 deletions kivy_garden/flower/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion kivy_garden/flower/_version.py

This file was deleted.

7 changes: 0 additions & 7 deletions kivy_garden/flower/tests/test_import.py

This file was deleted.

Loading

0 comments on commit 35468e5

Please sign in to comment.