create separate status scheme
Previously, your inactive colorscheme was also the colorscheme for the title and status portions of the bar. This made darker inactive text make the rest of the bar look bad. This uses the active color on the inactive background for a new status colorscheme.
parent
848584c9cf
commit
dbc5dbbc6e
|
|
@ -184,7 +184,7 @@ void bar_layout_render(struct Pipeline *pipeline, struct Bar *bar, cairo_t *pain
|
|||
|
||||
bar->layout->width = bar_component_width(bar->layout, pipeline);
|
||||
bar->layout->height = pipeline->shm->height;
|
||||
pipeline_set_colorscheme(pipeline, schemes[InActive_Scheme]);
|
||||
pipeline_set_colorscheme(pipeline, schemes[Status_Scheme]);
|
||||
basic_component_render(bar->layout, pipeline, painter, x, y);
|
||||
|
||||
*x += bar->layout->width;
|
||||
|
|
@ -249,7 +249,7 @@ void bar_title_render(struct Pipeline *pipeline, struct Bar *bar, cairo_t *paint
|
|||
if (bar->active)
|
||||
pipeline_set_colorscheme(pipeline, schemes[Active_Scheme]);
|
||||
else
|
||||
pipeline_set_colorscheme(pipeline, schemes[InActive_Scheme]);
|
||||
pipeline_set_colorscheme(pipeline, schemes[Status_Scheme]);
|
||||
|
||||
bar->title->width = pipeline->shm->width - *x - bar_component_width(bar->status, pipeline) - pipeline_get_future_widths(pipeline);
|
||||
bar->title->height = pipeline->shm->height;
|
||||
|
|
@ -280,7 +280,7 @@ void bar_status_render(struct Pipeline *pipeline, struct Bar *bar, cairo_t *pain
|
|||
|
||||
char *previous_status = NULL;
|
||||
|
||||
pipeline_set_colorscheme(pipeline, schemes[InActive_Scheme]);
|
||||
pipeline_set_colorscheme(pipeline, schemes[Status_Scheme]);
|
||||
if (!bar->active && status_on_active)
|
||||
pipeline_set_colorscheme(pipeline, (const int *[4]){ grey1, grey1 });
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,11 @@ static const int grey1[4] = { 34, 34, 34, 255 };
|
|||
static const int grey2[4] = { 187, 187, 187, 255 };
|
||||
static const int grey3[4] = { 238, 238, 238, 255 };
|
||||
|
||||
static const int *schemes[3][2] = {
|
||||
static const int *schemes[4][2] = {
|
||||
/* Scheme Type fg, bg */
|
||||
[InActive_Scheme] = {grey2, grey1},
|
||||
[Active_Scheme] = {grey3, cyan},
|
||||
[Status_Scheme] = {grey3, grey1},
|
||||
[Urgent_Scheme] = {grey1, grey3},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ enum Clicked {
|
|||
enum ColorScheme {
|
||||
InActive_Scheme = 0,
|
||||
Active_Scheme = 1,
|
||||
Urgent_Scheme = 2,
|
||||
Status_Scheme = 2,
|
||||
Urgent_Scheme = 3,
|
||||
};
|
||||
|
||||
enum TouchGesture {
|
||||
|
|
|
|||
Loading…
Reference in New Issue