awesome-gocui / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
344 stars 39 forks source link

[BUG] SelFgColor and SelBgColor are not used for Highlight anymore #59

Closed kanbara closed 4 years ago

kanbara commented 4 years ago

Describe the bug Apparently, SelFgColor and SelBgColor are not used anymore in highlighted frames. The original SetRune implementation checked the highlight state, and the current SetRune only bolds the fgColor, as seen in this commit https://github.com/awesome-gocui/gocui/commit/d9a7952a95539a75d4f64ccdfe30bd09b549e2a9

To Reproduce

v.Highlight = true
v.SelFgColor = gocui.ColorYellow

Observe the highlighted color is only bolded.

Expected behavior I expected to be able to use SelFgColor and SelBgColor to set the color. I'm under the impression that using SetHiglight and manually tracking the highlight state is what you expect users to do, then? Otherwise, I would like to bolden the text, but also check if the SelFgColor and SelBgColor are not ColorDefault, and if so, use them too.

What do you think?

Additionally, the documentation is then out of date. I understand this project was taken over to resurrect it (I switched today from jroimartin/gocui to this one) and I don't get why the documentation-- even on the main page lacking the overlap flag-- has not been updated.

glvr182 commented 4 years ago

You're right we have to update a lot of documetation. We haven't been active a lot since starting this project. I'll try to fix this and add documentation ASAP.

glvr182 commented 4 years ago

should be fixed in #61

kanbara commented 4 years ago

awesome, that commit looks good. thanks!

glvr182 commented 4 years ago

Sorry for taking so long to reply, should really stick more time in this. After all we forked because the original author abandoned it... Now we are doing the same thing