summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-11 00:54:58 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-11 00:54:58 +0000
commit3e86a1529609bc27fdd073f10c17098b9c878f7a (patch)
treedc0e88471e6f868537e81670d2edb4949e01ce0e /ui
parentf0d6c0f557d63cb3d9ec1f3c3d8847743879dca1 (diff)
downloadchromium_src-3e86a1529609bc27fdd073f10c17098b9c878f7a.zip
chromium_src-3e86a1529609bc27fdd073f10c17098b9c878f7a.tar.gz
chromium_src-3e86a1529609bc27fdd073f10c17098b9c878f7a.tar.bz2
Make gfx::Rect::CenterPoint() return the correct center point.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6474016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/rect.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/gfx/rect.cc b/ui/gfx/rect.cc
index 5831658..ceb6aee 100644
--- a/ui/gfx/rect.cc
+++ b/ui/gfx/rect.cc
@@ -231,7 +231,7 @@ Rect Rect::AdjustToFit(const Rect& rect) const {
}
Point Rect::CenterPoint() const {
- return Point(x() + (width() + 1) / 2, y() + (height() + 1) / 2);
+ return Point(x() + (width() - 1) / 2, y() + (height() - 1) / 2);
}
Rect Rect::Center(const gfx::Size& size) const {