Handle left aligned areas

This commit is contained in:
LemonBoy 2014-02-26 16:42:31 +00:00
parent 6977bb96d2
commit 24c1da491f

3
bar.c
View File

@ -246,6 +246,9 @@ area_add (char *str, const char *optend, char **end, monitor_t *mon, const int x
const int size = x - a->begin; const int size = x - a->begin;
switch (align) { switch (align) {
case ALIGN_L:
a->end = x;
break;
case ALIGN_C: case ALIGN_C:
a->begin = mon->width / 2 - size / 2 + a->begin / 2; a->begin = mon->width / 2 - size / 2 + a->begin / 2;
a->end = a->begin + size; a->end = a->begin + size;