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:
@@ -793,10 +793,10 @@ ShowImageView::AlignBitmap()
|
|||||||
|
|
||||||
// always align in the center
|
// always align in the center
|
||||||
if (width > bitmapWidth)
|
if (width > bitmapWidth)
|
||||||
rect.OffsetBy((width - bitmapWidth) / 2.0, 0);
|
rect.OffsetBy(floorf((width - bitmapWidth) / 2.0), 0);
|
||||||
|
|
||||||
if (height > bitmapHeight)
|
if (height > bitmapHeight)
|
||||||
rect.OffsetBy(0, (height - bitmapHeight) / 2.0);
|
rect.OffsetBy(0, floorf((height - bitmapHeight) / 2.0));
|
||||||
}
|
}
|
||||||
rect.OffsetBy(PEN_SIZE, PEN_SIZE);
|
rect.OffsetBy(PEN_SIZE, PEN_SIZE);
|
||||||
return rect;
|
return rect;
|
||||||
|
|||||||
Reference in New Issue
Block a user