Chromium Code Reviews| Index: chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm |
| diff --git a/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm b/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm |
| index 0f367fc155ebef6adda43e8f9fd3937a37352559..b7f024c95629bd63a2ddee60038c128db7b599d4 100644 |
| --- a/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm |
| +++ b/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm |
| @@ -7,9 +7,12 @@ |
| #import <Cocoa/Cocoa.h> |
| #include "base/logging.h" |
| +#include "chrome/browser/themes/theme_service.h" |
| +#import "chrome/browser/ui/cocoa/themed_window.h" |
| #import "chrome/browser/ui/cocoa/tracking_area.h" |
| #import "chrome/browser/ui/panels/panel_window_controller_cocoa.h" |
| #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" |
| +#include "ui/base/theme_provider.h" |
| const int kRoundedCornerSize = 6; |
| const int kCloseButtonLeftPadding = 8; |
| @@ -45,13 +48,10 @@ const int kCloseButtonLeftPadding = 8; |
| topRightCornerRadius:kRoundedCornerSize |
| bottomLeftCornerRadius:0.0 |
| bottomRightCornerRadius:0.0]; |
| - // TODO(dimich): paint theme image here. |
| - [[NSColor colorWithDeviceRed:1 green:1 blue:0 alpha:0.9] setFill]; |
| - [path fill]; |
| - [[NSColor colorWithCalibratedWhite:0.4 alpha:1.0] set]; |
| - NSPoint from = [self bounds].origin; |
| - NSPoint to = NSMakePoint(from.x + NSWidth([self bounds]), from.y); |
| - [NSBezierPath strokeLineFromPoint:from toPoint:to]; |
| + [path addClip]; |
| + NSPoint phase = [[self window] themePatternPhase]; |
| + [[NSGraphicsContext currentContext] setPatternPhase:phase]; |
| + [self drawBackgroundWithOpaque:YES]; |
|
Dmitry Titov
2011/08/25 00:08:21
It seems there should be more to it. See, for exam
dcheng
2011/08/25 18:48:54
I agree, but I would be more comfortable splitting
Dmitry Titov
2011/08/25 19:24:51
Ok, I'm fine with smaller patches.
|
| } |
| - (void)attach { |