mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
A couple small color tweaks to make the currently playing track more obvious.
This commit is contained in:
parent
adbe9bf859
commit
9f2a04bf78
@ -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);
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user