diff options
author | sabetts <sabetts> | 2006-11-18 01:07:34 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2006-11-18 01:07:34 +0000 |
commit | 8bcab4f3c98bb4a22389ab46224f727d6cbb0bdf (patch) | |
tree | cbe2d0eb93288af97986f389b9862367cebb5c0e /src | |
parent | 6c7e56dbc82d498d18f67108f436d678d57baaee (diff) | |
download | ratpoison-8bcab4f3c98bb4a22389ab46224f727d6cbb0bdf.zip |
(bar_y): take into account screen padding
(bar_x): likewise
Diffstat (limited to 'src')
-rw-r--r-- | src/bar.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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; } |