From 32b9f1f7fc3bceb34d48c1a473790567f1d9d7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 12 Jan 2008 00:27:08 +0000 Subject: [PATCH] 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 --- src/apps/showimage/ShowImageView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index 8c22754c84..534a368351 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -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;