A couple small color tweaks to make the currently playing track more obvious.

This commit is contained in:
casey 2016-05-31 22:36:09 -07:00
parent adbe9bf859
commit 9f2a04bf78
3 changed files with 9 additions and 3 deletions

View File

@ -126,12 +126,16 @@ IScrollAdapter::EntryPtr TrackListView::Adapter::GetEntry(size_t index) {
TrackPtr track = parent.metadata->at(index); TrackPtr track = parent.metadata->at(index);
TrackPtr playing = parent.playing; TrackPtr playing = parent.playing;
if (!selected && if (playing &&
playing &&
playing->Id() == track->Id() && playing->Id() == track->Id() &&
playing->LibraryId() == track->LibraryId()) playing->LibraryId() == track->LibraryId())
{ {
attrs = COLOR_PAIR(BOX_COLOR_YELLOW_ON_BLACK); if (selected) {
attrs = COLOR_PAIR(BOX_COLOR_BLACK_ON_YELLOW);
}
else {
attrs = COLOR_PAIR(BOX_COLOR_YELLOW_ON_BLACK) | A_BOLD;
}
} }
std::string trackNum = track->GetValue(constants::Track::TRACK_NUM); std::string trackNum = track->GetValue(constants::Track::TRACK_NUM);

View File

@ -19,4 +19,5 @@ void Colors::Init() {
init_pair(BOX_COLOR_GREEN_ON_BLACK, COLOR_GREEN, COLOR_BLACK); init_pair(BOX_COLOR_GREEN_ON_BLACK, COLOR_GREEN, COLOR_BLACK);
init_pair(BOX_COLOR_BLACK_ON_BLACK, COLOR_BLACK, COLOR_BLACK); init_pair(BOX_COLOR_BLACK_ON_BLACK, COLOR_BLACK, COLOR_BLACK);
init_pair(BOX_COLOR_RED_ON_GREEN, COLOR_RED, COLOR_GREEN); init_pair(BOX_COLOR_RED_ON_GREEN, COLOR_RED, COLOR_GREEN);
init_pair(BOX_COLOR_BLACK_ON_YELLOW, COLOR_BLACK, COLOR_YELLOW);
} }

View File

@ -14,6 +14,7 @@
#define BOX_COLOR_GREEN_ON_BLACK 10 #define BOX_COLOR_GREEN_ON_BLACK 10
#define BOX_COLOR_BLACK_ON_BLACK 11 #define BOX_COLOR_BLACK_ON_BLACK 11
#define BOX_COLOR_RED_ON_GREEN 12 #define BOX_COLOR_RED_ON_GREEN 12
#define BOX_COLOR_BLACK_ON_YELLOW 13
namespace cursespp { namespace cursespp {
class Colors { class Colors {