patch by Andrea Anzani:

* fix a rounding problem when layouting the image
Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23427 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-01-12 00:27:08 +00:00
parent fa8d1c38f2
commit 32b9f1f7fc

View File

@ -793,10 +793,10 @@ ShowImageView::AlignBitmap()
// always align in the center
if (width > bitmapWidth)
rect.OffsetBy((width - bitmapWidth) / 2.0, 0);
rect.OffsetBy(floorf((width - bitmapWidth) / 2.0), 0);
if (height > bitmapHeight)
rect.OffsetBy(0, (height - bitmapHeight) / 2.0);
rect.OffsetBy(0, floorf((height - bitmapHeight) / 2.0));
}
rect.OffsetBy(PEN_SIZE, PEN_SIZE);
return rect;