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

Unified Diff: chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm

Issue 11077006: Correct padding and focus ring for frameless constrained window dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix license header Created 8 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
Index: chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm b/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
index c83930d134c8e52282ae93f469950448e7705c69..9b6174eb77f9794a68e25909dd44836ee6c405cb 100644
--- a/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
+++ b/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
@@ -17,6 +17,7 @@
#import "chrome/browser/ui/cocoa/intents/web_intent_service_row_view_controller.h"
#import "chrome/browser/ui/cocoa/key_equivalent_constants.h"
#include "chrome/browser/ui/constrained_window.h"
+#include "chrome/browser/ui/constrained_window_constants.h"
#include "chrome/browser/ui/intents/web_intent_picker_delegate.h"
#include "chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h"
#include "content/public/browser/web_contents.h"
@@ -182,8 +183,12 @@
innerFrame.size.height = std::max(minSize.height, NSHeight(innerFrame));
NSRect bounds = NSInsetRect(innerFrame,
- -ConstrainedWindow::kHorizontalPadding,
- -ConstrainedWindow::kVerticalPadding);
+ -ConstrainedWindowConstants::kHorizontalPadding,
+ 0);
+ bounds.origin.y -= ConstrainedWindowConstants::kClientTopPadding;
+ bounds.size.height = NSHeight(innerFrame) +
+ ConstrainedWindowConstants::kClientTopPadding +
+ ConstrainedWindowConstants::kClientBottomPadding;
[[viewController view] setFrame:bounds];
[viewController layoutSubviewsWithinFrame:innerFrame];
@@ -201,9 +206,14 @@
- (NSRect)minimumInnerFrame {
NSRect bounds = NSMakeRect(0, 0, WebIntentPicker::kWindowMinWidth,
WebIntentPicker::kWindowMinHeight);
- return NSInsetRect(bounds,
- ConstrainedWindow::kHorizontalPadding,
- ConstrainedWindow::kVerticalPadding);
+ bounds = NSInsetRect(bounds,
+ ConstrainedWindowConstants::kHorizontalPadding,
+ 0);
+ bounds.origin.y += ConstrainedWindowConstants::kClientTopPadding;
+ bounds.size.height = bounds.size.height -
+ ConstrainedWindowConstants::kClientTopPadding -
+ ConstrainedWindowConstants::kClientBottomPadding;
+ return bounds;
}
- (NSViewController<WebIntentViewController>*)currentViewController {

Powered by Google App Engine
This is Rietveld 408576698