simplify title scheme set
This commit is contained in:
parent
e6eb713fb3
commit
f36ce99d80
1 changed files with 3 additions and 5 deletions
8
dam.c
8
dam.c
|
@ -260,13 +260,11 @@ bar_draw(Bar *bar)
|
||||||
x = drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->layout, 0);
|
x = drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->layout, 0);
|
||||||
|
|
||||||
if ((w = bar->width - tw - x) > bar->height) {
|
if ((w = bar->width - tw - x) > bar->height) {
|
||||||
if (bar->title) {
|
drwl_setscheme(bar->drw, colors[bar == selbar && bar->title ? SchemeSel : SchemeNorm]);
|
||||||
drwl_setscheme(bar->drw, colors[bar == selbar ? SchemeSel : SchemeNorm]);
|
if (bar->title)
|
||||||
drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->title, 0);
|
drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->title, 0);
|
||||||
} else {
|
else
|
||||||
drwl_setscheme(bar->drw, colors[SchemeNorm]);
|
|
||||||
drwl_rect(bar->drw, x, 0, w, bar->height, 1, 1);
|
drwl_rect(bar->drw, x, 0, w, bar->height, 1, 1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
drwl_setimage(bar->drw, NULL);
|
drwl_setimage(bar->drw, NULL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue