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:
parent
fa8d1c38f2
commit
32b9f1f7fc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user