mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 13:02:35 +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);
|
attrs = COLOR_PAIR(CURSESPP_BLACK_ON_YELLOW);
|
||||||
}
|
}
|
||||||
else {
|
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);
|
attrs = COLOR_PAIR(CURSESPP_BLACK_ON_YELLOW);
|
||||||
}
|
}
|
||||||
else {
|
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
|
/* 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
|
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
|
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. */
|
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();
|
double actualTime = transport.Position();
|
||||||
|
|
||||||
if (paused || stopped || fabs(smoothedTime - actualTime) > TIME_SLOP) {
|
if (paused || stopped || fabs(smoothedTime - actualTime) > TIME_SLOP) {
|
||||||
|
@ -43,7 +43,7 @@ static int red = COLOR_RED;
|
|||||||
static int yellow = COLOR_YELLOW;
|
static int yellow = COLOR_YELLOW;
|
||||||
static int green = COLOR_GREEN;
|
static int green = COLOR_GREEN;
|
||||||
static int black = COLOR_BLACK;
|
static int black = COLOR_BLACK;
|
||||||
static int background = -1;
|
|
||||||
|
|
||||||
#define COLOR_CUSTOM_WHITE 16
|
#define COLOR_CUSTOM_WHITE 16
|
||||||
#define COLOR_CUSTOM_BLUE 17
|
#define COLOR_CUSTOM_BLUE 17
|
||||||
@ -51,6 +51,10 @@ static int background = -1;
|
|||||||
#define COLOR_CUSTOM_YELLOW 19
|
#define COLOR_CUSTOM_YELLOW 19
|
||||||
#define COLOR_CUSTOM_GREEN 20
|
#define COLOR_CUSTOM_GREEN 20
|
||||||
#define COLOR_CUSTOM_BLACK 21
|
#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)
|
#define SCALE(x) ((x * 1000) / 255)
|
||||||
|
|
||||||
@ -73,6 +77,7 @@ void Colors::Init() {
|
|||||||
red = initColor(COLOR_CUSTOM_RED, 220, 82, 86);
|
red = initColor(COLOR_CUSTOM_RED, 220, 82, 86);
|
||||||
green = initColor(COLOR_CUSTOM_GREEN, 166, 226, 46);
|
green = initColor(COLOR_CUSTOM_GREEN, 166, 226, 46);
|
||||||
yellow = initColor(COLOR_CUSTOM_YELLOW, 230, 220, 116);
|
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);
|
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_BLACK_ON_TRANSPARENT, black, background);
|
||||||
init_pair(CURSESPP_RED_ON_GREEN, red, green);
|
init_pair(CURSESPP_RED_ON_GREEN, red, green);
|
||||||
init_pair(CURSESPP_BLACK_ON_YELLOW, black, yellow);
|
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_BLACK_ON_TRANSPARENT 11
|
||||||
#define CURSESPP_RED_ON_GREEN 12
|
#define CURSESPP_RED_ON_GREEN 12
|
||||||
#define CURSESPP_BLACK_ON_YELLOW 13
|
#define CURSESPP_BLACK_ON_YELLOW 13
|
||||||
|
#define CURSESPP_SELECTED_LIST_ITEM 14
|
||||||
|
|
||||||
namespace cursespp {
|
namespace cursespp {
|
||||||
class Colors {
|
class Colors {
|
||||||
|
Loading…
Reference in New Issue
Block a user