pfalcon/picotui

Set Widget Colors (discussion)

peterjschroeder opened this issue · 4 comments

It would be pretty useful to be able to set a widgets foreground and background colors outside of the library.

Can you please draft a "user story" for this feature?

Lets say someone wants to set a Listbox colors. Rather than the black background and a blue selector, they want a green background and a magenta selector.

When searching for a way to do this, I figured I could listbox.attr_color(C_GREEN, C_WHITE) to set the background. It doesn't seem to work that way, unless I'm doing something wrong. The selector seems to have no way to change unless you edit the hardcoded entry int the library.

I have actually imped this in my fork, but just for Listbox so far. So now all a person has to do is something like this to achieve the above:

listbox = WListBox(1, 1, items, fcolor=C_WHITE, bcolor=C_GREEN, scolor=C_MAGENTA)

ffinder

Can you please draft a "user story" for this feature?

Lets say someone wants to set a Listbox colors.

Yeah, let's say. But why would they want to do that?

Picotui implement a color scheme, roughly based on a well-known (in its time) Turbo Vision color scheme.

Doing things like green text and red background (or whatever) is somewhat outside the original goal of the project of being minimal and allow to develop a consistently-looking TUI apps.

In #30 (comment) I comment, that I'm not totally opposed to that, but would like more interesting projects to be tackled first, to not have concerns regarding efficiency of additions like that.

Closing for now as out-of-scope for the foreseeable future.