summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/browser_window_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/browser_window_controller.mm')
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 47b3ef9..7a1cbc4 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -36,6 +36,11 @@ const int kWindowGradientHeight = 24;
// heuristic.
- (void)fixWindowGradient;
+// We need to adjust where sheets come out of the window, as by default they
+// erupt from the omnibox, which is rather weird.
+- (NSRect)window:(NSWindow *)window
+willPositionSheet:(NSWindow *)sheet
+ usingRect:(NSRect)defaultSheetRect;
@end
@@ -413,4 +418,12 @@ const int kWindowGradientHeight = 24;
}
}
+- (NSRect)window:(NSWindow *)window
+willPositionSheet:(NSWindow *)sheet
+ usingRect:(NSRect)defaultSheetRect {
+ NSRect windowFrame = [window frame];
+ defaultSheetRect.origin.y = windowFrame.size.height - 10;
+ return defaultSheetRect;
+}
+
@end