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

Unified Diff: chrome/browser/cocoa/bookmark_bar_folder_controller.mm

Issue 3029020: Quick fix for window sizing under resolution independence on Mac. Scrolling a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/bookmark_bar_folder_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_bar_folder_controller.mm (revision 53255)
+++ chrome/browser/cocoa/bookmark_bar_folder_controller.mm (working copy)
@@ -377,16 +377,20 @@
[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 - windowHeight,
- windowWidth,
- windowHeight);
+ newWindowTopLeft.y,
+ windowSize.width,
+ windowSize.height);
// Make the scrolled content be the right size (full size).
NSRect mainViewFrame = NSMakeRect(0, 0,
- NSWidth(windowFrame) -
+ windowWidth -
bookmarks::kScrollViewContentWidthMargin,
- NSHeight(windowFrame));
+ windowHeight);
[mainView_ setFrame:mainViewFrame];
// Make sure the window fits on the screen. If not, constrain.
@@ -403,7 +407,7 @@
// If scrollable then offset the view and show the arrows.
if (scrollable_) {
[mainView_ scrollPoint:NSMakePoint(0, (NSHeight(mainViewFrame) -
- NSHeight(windowFrame)))];
+ windowHeight))];
[self showOrHideScrollArrows];
[self addOrUpdateScrollTracking];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698