diff --git a/src/musikbox/app/window/CategoryListView.cpp b/src/musikbox/app/window/CategoryListView.cpp index ffb4e4075..444a14cf7 100755 --- a/src/musikbox/app/window/CategoryListView.cpp +++ b/src/musikbox/app/window/CategoryListView.cpp @@ -214,7 +214,7 @@ IScrollAdapter::EntryPtr CategoryListView::Adapter::GetEntry(size_t index) { attrs = COLOR_PAIR(CURSESPP_BLACK_ON_YELLOW); } else { - attrs = COLOR_PAIR(CURSESPP_YELLOW_ON_TRANSPARENT) | A_BOLD; + attrs = COLOR_PAIR(CURSESPP_SELECTED_LIST_ITEM) | A_BOLD; } } diff --git a/src/musikbox/app/window/TrackListView.cpp b/src/musikbox/app/window/TrackListView.cpp index 4bb0a9e08..739c6a692 100755 --- a/src/musikbox/app/window/TrackListView.cpp +++ b/src/musikbox/app/window/TrackListView.cpp @@ -201,7 +201,7 @@ IScrollAdapter::EntryPtr TrackListView::Adapter::GetEntry(size_t index) { attrs = COLOR_PAIR(CURSESPP_BLACK_ON_YELLOW); } else { - attrs = COLOR_PAIR(CURSESPP_YELLOW_ON_TRANSPARENT) | A_BOLD; + attrs = COLOR_PAIR(CURSESPP_SELECTED_LIST_ITEM) | A_BOLD; } } diff --git a/src/musikbox/app/window/TransportWindow.cpp b/src/musikbox/app/window/TransportWindow.cpp index 8f6e6e2bd..374b72da5 100755 --- a/src/musikbox/app/window/TransportWindow.cpp +++ b/src/musikbox/app/window/TransportWindow.cpp @@ -347,9 +347,9 @@ void TransportWindow::Update() { /* calculating playback time is inexact because it's based on buffers that are sent to the output. here we use a simple smoothing function to hopefully mitigate jumping around. basically: draw the time as one second more than the - last time we displayed, unless they are more than a second apart. note this + last time we displayed, unless they are more than few seconds apart. note this only works if REFRESH_INTERVAL_MS is 1000. */ - double smoothedTime = this->lastTime += 1.0f; + double smoothedTime = this->lastTime += 1.0f; /* 1000 millis */ double actualTime = transport.Position(); if (paused || stopped || fabs(smoothedTime - actualTime) > TIME_SLOP) { diff --git a/src/musikbox/cursespp/Colors.cpp b/src/musikbox/cursespp/Colors.cpp index 29a98c6eb..1da97a08f 100755 --- a/src/musikbox/cursespp/Colors.cpp +++ b/src/musikbox/cursespp/Colors.cpp @@ -43,7 +43,7 @@ static int red = COLOR_RED; static int yellow = COLOR_YELLOW; static int green = COLOR_GREEN; static int black = COLOR_BLACK; -static int background = -1; + #define COLOR_CUSTOM_WHITE 16 #define COLOR_CUSTOM_BLUE 17 @@ -51,6 +51,10 @@ static int background = -1; #define COLOR_CUSTOM_YELLOW 19 #define COLOR_CUSTOM_GREEN 20 #define COLOR_CUSTOM_BLACK 21 +#define COLOR_SELECTED_LIST_ITEM_BG 22 + +static int background = -1; +static int selected = -1; #define SCALE(x) ((x * 1000) / 255) @@ -73,6 +77,7 @@ void Colors::Init() { red = initColor(COLOR_CUSTOM_RED, 220, 82, 86); green = initColor(COLOR_CUSTOM_GREEN, 166, 226, 46); yellow = initColor(COLOR_CUSTOM_YELLOW, 230, 220, 116); + selected = initColor(COLOR_SELECTED_LIST_ITEM_BG, 66, 66, 56); } init_pair(CURSESPP_WHITE_ON_BLUE, white, blue); @@ -88,4 +93,5 @@ void Colors::Init() { init_pair(CURSESPP_BLACK_ON_TRANSPARENT, black, background); init_pair(CURSESPP_RED_ON_GREEN, red, green); init_pair(CURSESPP_BLACK_ON_YELLOW, black, yellow); + init_pair(CURSESPP_SELECTED_LIST_ITEM, yellow, selected); } diff --git a/src/musikbox/cursespp/Colors.h b/src/musikbox/cursespp/Colors.h index b03291151..75b60b5aa 100755 --- a/src/musikbox/cursespp/Colors.h +++ b/src/musikbox/cursespp/Colors.h @@ -49,6 +49,7 @@ #define CURSESPP_BLACK_ON_TRANSPARENT 11 #define CURSESPP_RED_ON_GREEN 12 #define CURSESPP_BLACK_ON_YELLOW 13 +#define CURSESPP_SELECTED_LIST_ITEM 14 namespace cursespp { class Colors {