Package with widgets and components for Textual TUI Framework.
Project description
CvaniaK's Widgets for Textual TUI (ck_widgets
)
This is list of Widgets for Textual framework, created from my personal need.
⚠ NOTE: This project widgets names, arguments, etc. can vary along diffrent versions.
Install
ValueBar
Examples
The simples example:
# Simples value bar
from ck_widgets.widgets import ValueBarH, ValueBarV
vbar_horizontal = ValueBarH(max_value=50)
# or
vbar_vertical = ValueBarV(max_value=50)
And here is example with almost all arguments:
# Example with almost all arguments
from ck_widgets.widgets import ValueBarH, CColor, CustomColor
from rich import box
background_color: List[CColor] = ["rgb(0,0,0)", "rgb(0,0,0)", "yellow"]
ValueBarH(
name="name_to_catch_in_event",
label="Almost all arguments",
label_align="left",
label_position="bottom",
start_value=25,
max_value=50,
height=6,
instant=True,
reversed=True,
color=CustomColor.gradient("green", "rgb(0, 100, 250)"),
bg_color=background_color,
border_style="yellow",
padding=(1,1),
box=box.DOUBLE_EDGE,
)
And this example:
you can check code in this file ck_widgets/exmples/value_bar.py
or test it by using command below:
python3 -m ck_widgets.examples.value_bar
Known Limitations
- You need to force size of layout to be not smaller than maximum size of of ValueBar (otherwise it will behave badly)
- ...
TODO
- Reactive version (so it gives values from 0 to 1 and can be resized/'squashed')
- Be sure that provide all arguments
- Test edge cases
- Clean up how to provide color
- Label on left or right site
- ...
Change Log
[0.1.0] - 2022-02-26
Added
- ValueBar
- Test version of DebugWidget
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for ck_widgets-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcdbd320aed3cde661c85804e470dcae8528d0e6b6b8d722c3c0761f3a098e7a |
|
MD5 | d961da76ddeea7749fbf814e92d934f6 |
|
BLAKE2b-256 | 2e1f07b8a188649b251be0d64c1fc1ded6e96bd6d2bfa69f7053e43bf44e9eca |