summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bar.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/bar.c b/src/bar.c
index 769b3b7..01ecfcd 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -98,17 +98,17 @@ bar_x (rp_screen *s, int width)
case NorthWestGravity:
case WestGravity:
case SouthWestGravity:
- x = s->left;
+ x = s->left + defaults.padding_left;
break;
case NorthGravity:
case CenterGravity:
case SouthGravity:
- x = s->left + (s->width - width - defaults.bar_border_width * 2) / 2;
+ x = s->left + (s->width - width - defaults.bar_border_width * 2) / 2 - defaults.padding_right;
break;
case NorthEastGravity:
case EastGravity:
case SouthEastGravity:
- x = s->left + s->width - width - defaults.bar_border_width * 2;
+ x = s->left + s->width - width - defaults.bar_border_width * 2 - defaults.padding_right;
break;
}
@@ -125,19 +125,21 @@ bar_y (rp_screen *s, int height)
case NorthEastGravity:
case NorthGravity:
case NorthWestGravity:
- y = s->top;
+ y = s->top + defaults.padding_top;
break;
case EastGravity:
case CenterGravity:
case WestGravity:
y = s->top + (s->height - height
- - defaults.bar_border_width * 2) / 2;
+ - defaults.bar_border_width * 2) / 2
+ - defaults.padding_top;
break;
case SouthEastGravity:
case SouthGravity:
case SouthWestGravity:
y = s->top + (s->height - height
- - defaults.bar_border_width * 2);
+ - defaults.bar_border_width * 2)
+ - defaults.padding_top;
break;
}