Added offset support (hgap now acts as offset when width is specified)

This commit is contained in:
Linden Krouse 2016-03-14 23:32:26 -04:00
parent 6525f83dd0
commit dec598ceb1
2 changed files with 1 additions and 3 deletions

View file

@ -65,7 +65,7 @@ int ya_create_bar(ya_bar_t * bar) {
//bar->width = ya.scr->width_in_pixels - 2*(bar->hgap);
bar->win = xcb_generate_id(ya.c);
int x, y;
x = (ya.scr->width_in_pixels - bar->width) /2;
x = bar->hgap;
switch(bar->position){
case YA_TOP:{
y = bar->vgap;

View file

@ -203,8 +203,6 @@ void ya_setup_bar(config_setting_t * set) {
}
else {
bar->width = retint;
//ignore hgap if width was specified
bar->hgap = 0;
}
retcnf = config_setting_lookup_int(set, "underline-size", &retint);
if(retcnf == CONFIG_TRUE) {