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

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

Issue 629973002: Adjust bookmark folder menu window if its parent button is partly off-screen to the left. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
index 2eb0880c5f79ed46df5d53ad068412a2a6691471..b9a69193732358a5a71a2154e09db0bd335e38f5 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
@@ -558,6 +558,12 @@ NSRect GetFirstButtonFrameForHeight(CGFloat height) {
newWindowTopLeft.y = topOfWindow.y +
2 * bookmarks::kBookmarkVerticalPadding;
}
+
+ // If parent button was partially off screen to the left, offset it's folder
+ // menu window horizontally, so that complete menu is seen from the left.
+ if (newWindowTopLeft.x < 0.0)
Alexei Svitkine (slow) 2014/10/06 17:55:28 Are you sure this is correct? What if the user ha
Gaja 2014/10/07 07:41:10 Oh, I did not think of it. But I have a doubt here
+ newWindowTopLeft.x = 0.0;
+
return newWindowTopLeft;
}
« 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