Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6522)

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm

Issue 6257005: Adjustments to bookmark bar folder menu placement issues.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
===================================================================
--- chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm (revision 71884)
+++ chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -231,10 +231,11 @@
if ([button isFolder]) {
NSRect imageRect = NSZeroRect;
imageRect.size = [arrowImage_ size];
- NSRect drawRect = NSOffsetRect(imageRect,
- NSWidth(cellFrame) - NSWidth(imageRect),
- (NSHeight(cellFrame) / 2.0) -
- (NSHeight(imageRect) / 2.0));
+ const CGFloat kArrowOffset = 1.0; // Required for proper centering.
+ CGFloat dX = NSWidth(cellFrame) - NSWidth(imageRect);
+ CGFloat dY = (NSHeight(cellFrame) / 2.0) - (NSHeight(imageRect) / 2.0) +
+ kArrowOffset;
+ NSRect drawRect = NSOffsetRect(imageRect, dX, dY);
[arrowImage_ drawInRect:drawRect
fromRect:imageRect
operation:NSCompositeSourceOver
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698