Skip to content

Tags: gcla/gowid

Tags

v1.4.0

Toggle v1.4.0's commit message
Add a read-only option to the edit widget

Thanks again to @Peter2121 for this suggestion and implementation!

If the edit widget is set to read-only, user input that would otherwise
change the content of the widget is short-circuited. Note that this
still allows scrolling around the widget.

v1.3.0

Toggle v1.3.0's commit message
Add a new paragraph widget constructor

This allows the user to pass the individual words individually, if the
split algorithm that New() uses isn't appropriate.

v1.2.0

Toggle v1.2.0's commit message
Better color interpolation when base16-shell is in use

If your gowid application expresses its colors in RGB
format (e.g. #aa55bc), and your application is running in a 256-color
terminal (without COLORTERM=truecolor set), then gowid will try to find
the closest matching color in the 256-color space. If you are using
base16-shell (https://github.com/chriskempson/base16-shell), then your
base16-shell theme likely has remapped colors 0-21 out of the terminal's
256-color space. Gowid doesn't know this, and assumes colors 0-21 are
"normal". This can result in it interpolating a poor match for the
user's desired RGB color.

You can set IgnoreBase16 to true to have gowid ignore colors 0-21 when
selecting the best match for your RGB color. If you set
GOWID_IGNORE_BASE16=1 in the environment before running, then your
application will apply this rule automatically. For example, this would
mean black - RGB #000000 - would map to color 232 in the 256-color
space (https://jonasjacek.github.io/colors/)

Note that this is a global variable, not set at the application level.

v1.1.0

Toggle v1.1.0's commit message
Be more forgiving if style types are nil.

If the user creates a styled widget like this

styled.New(w, nil, nil)

then don't crash when rendering - just don't style it.

v1.0.0

Toggle v1.0.0's commit message
Gowid 1.0.0