mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-28 15:16:43 +00:00
A couple test color updates (may not work in iTerm?)
This commit is contained in:
parent
ae3c20c9eb
commit
b7e6099483
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user