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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h" 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h"
6 6
7 #import "base/memory/scoped_nsobject.h" 7 #import "base/memory/scoped_nsobject.h"
8 #import "chrome/browser/ui/constrained_window.h" 8 #import "chrome/browser/ui/constrained_window.h"
9 #import "chrome/browser/ui/constrained_window_constants.h"
9 #include "skia/ext/skia_utils_mac.h" 10 #include "skia/ext/skia_utils_mac.h"
10 11
11 // The content view for the custom window. 12 // The content view for the custom window.
12 @interface ConstrainedWindowCustomWindowContentView : NSView 13 @interface ConstrainedWindowCustomWindowContentView : NSView
13 @end 14 @end
14 15
15 @implementation ConstrainedWindowCustomWindow 16 @implementation ConstrainedWindowCustomWindow
16 17
17 - (id)initWithContentRect:(NSRect)contentRect { 18 - (id)initWithContentRect:(NSRect)contentRect {
18 if ((self = [super initWithContentRect:contentRect 19 if ((self = [super initWithContentRect:contentRect
(...skipping 15 matching lines...) Expand all
34 return YES; 35 return YES;
35 } 36 }
36 37
37 @end 38 @end
38 39
39 @implementation ConstrainedWindowCustomWindowContentView 40 @implementation ConstrainedWindowCustomWindowContentView
40 41
41 - (void)drawRect:(NSRect)rect { 42 - (void)drawRect:(NSRect)rect {
42 NSBezierPath* path = [NSBezierPath 43 NSBezierPath* path = [NSBezierPath
43 bezierPathWithRoundedRect:[self bounds] 44 bezierPathWithRoundedRect:[self bounds]
44 xRadius:ConstrainedWindow::kBorderRadius 45 xRadius:ConstrainedWindowConstants::kBorderRadius
45 yRadius:ConstrainedWindow::kBorderRadius]; 46 yRadius:ConstrainedWindowConstants::kBorderRadius];
46 [gfx::SkColorToCalibratedNSColor( 47 [gfx::SkColorToCalibratedNSColor(
47 ConstrainedWindow::GetBackgroundColor()) set]; 48 ConstrainedWindow::GetBackgroundColor()) set];
48 [path fill]; 49 [path fill];
49 50
50 [[self window] invalidateShadow]; 51 [[self window] invalidateShadow];
51 } 52 }
52 53
53 @end 54 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698