Tags: gcla/gowid
Tags
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.
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.