Fix an off by one error,

...this allows the background of the listbox to have no gaps.
This commit is contained in:
Mark de Wever 2008-05-18 14:08:54 +00:00
parent e4ba59b1fe
commit 99b9026880
2 changed files with 4 additions and 7 deletions

View file

@ -76,9 +76,6 @@
[row]
[column]
# FIXME we want no border but that is broken atm.
border = "all"
border_size = 1
grow_factor = 1
horizontal_grow = "true"

View file

@ -116,8 +116,8 @@ surface save_background(const surface& background, const SDL_Rect& rect)
{
assert(background);
assert((background->flags & SDL_RLEACCEL) == 0);
assert(rect.x + rect.w < background->w);
assert(rect.y + rect.h < background->h);
assert(rect.x + rect.w <= background->w);
assert(rect.y + rect.h <= background->h);
surface result(SDL_CreateRGBSurface(SDL_SWSURFACE,
rect.w, rect.h, 32, 0xFF0000, 0xFF00, 0xFF, 0xFF000000));
@ -151,8 +151,8 @@ void restore_background(const surface& restorer,
assert(restorer);
assert((background->flags & SDL_RLEACCEL) == 0);
assert((restorer->flags & SDL_RLEACCEL) == 0);
assert(rect.x + rect.w < background->w);
assert(rect.y + rect.h < background->h);
assert(rect.x + rect.w <= background->w);
assert(rect.y + rect.h <= background->h);
{
// Extra scoping used for the surface_lock.