diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 00:19:39 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 00:19:39 +0000 |
commit | 90403b24fe3f04d3ff486a6f595995e147645421 (patch) | |
tree | 4c6cfab2e786fdeaabca02e2b35b1cf58867f81f /chrome/browser/cocoa | |
parent | 684f665ff630ccae011fb279276b194ef95c631e (diff) | |
download | chromium_src-90403b24fe3f04d3ff486a6f595995e147645421.zip chromium_src-90403b24fe3f04d3ff486a6f595995e147645421.tar.gz chromium_src-90403b24fe3f04d3ff486a6f595995e147645421.tar.bz2 |
Revert 53272 - Quick fix for window sizing under resolution independence on Mac. Scrolling and the "more" arrows are still broken, but this at least makes things usable.
BUG=http://crbug.com/19476
TEST=run app under high-res, click bookmark bar button, see that the popup is sized to hold the buttons.
Review URL: http://codereview.chromium.org/3029020
TBR=avi@chromium.org
Review URL: http://codereview.chromium.org/3010020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_folder_controller.mm | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_folder_controller.mm b/chrome/browser/cocoa/bookmark_bar_folder_controller.mm index 476f1f1..a58745e 100644 --- a/chrome/browser/cocoa/bookmark_bar_folder_controller.mm +++ b/chrome/browser/cocoa/bookmark_bar_folder_controller.mm @@ -377,20 +377,16 @@ const CGFloat kScrollWindowVerticalMargin = 0.0; [self adjustButtonWidths] + (2 * bookmarks::kBookmarkVerticalPadding) + bookmarks::kScrollViewContentWidthMargin; NSPoint newWindowTopLeft = [self windowTopLeftForWidth:windowWidth]; - NSSize windowSize = [scrollView_ convertSize:NSMakeSize(windowWidth, - windowHeight) - toView:nil]; - newWindowTopLeft.y -= windowSize.height; NSRect windowFrame = NSMakeRect(newWindowTopLeft.x, - newWindowTopLeft.y, - windowSize.width, - windowSize.height); + newWindowTopLeft.y - windowHeight, + windowWidth, + windowHeight); // Make the scrolled content be the right size (full size). NSRect mainViewFrame = NSMakeRect(0, 0, - windowWidth - + NSWidth(windowFrame) - bookmarks::kScrollViewContentWidthMargin, - windowHeight); + NSHeight(windowFrame)); [mainView_ setFrame:mainViewFrame]; // Make sure the window fits on the screen. If not, constrain. @@ -407,7 +403,7 @@ const CGFloat kScrollWindowVerticalMargin = 0.0; // If scrollable then offset the view and show the arrows. if (scrollable_) { [mainView_ scrollPoint:NSMakePoint(0, (NSHeight(mainViewFrame) - - windowHeight))]; + NSHeight(windowFrame)))]; [self showOrHideScrollArrows]; [self addOrUpdateScrollTracking]; } |