Fix scaling of fixed aspect ratio backgrounds.

SVN revision: 19545
This commit is contained in:
Kim Woelders 2006-01-05 22:20:00 +00:00
parent f87f2f53aa
commit 5d1af7b440
1 changed files with 5 additions and 2 deletions

View File

@ -448,6 +448,9 @@ BgFindImageSize(BgPart * bgp, unsigned int rw, unsigned int rh,
{
int w, h;
if (bgp->keep_aspect)
bgp->xperc = bgp->yperc;
if (bgp->xperc > 0)
w = (rw * bgp->xperc) >> 10;
else
@ -684,8 +687,8 @@ BackgroundRealize(Background * bg, Drawable draw, unsigned int rw,
imlib_context_set_image(bg->bg.im);
BgFindImageSize(&(bg->bg), rw, rh, &w, &h);
x = ((rw - w) * bg->bg.xjust) >> 10;
y = ((rh - h) * bg->bg.yjust) >> 10;
x = ((int)(rw - w) * bg->bg.xjust) >> 10;
y = ((int)(rh - h) * bg->bg.yjust) >> 10;
}
if (is_win && hasbg && !hasfg && x == 0 && y == 0 &&