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

Unified Diff: chrome/browser/cocoa/background_gradient_view.mm

Issue 2944017: Putting the findbar into a child window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | chrome/browser/cocoa/browser_window_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/background_gradient_view.mm
===================================================================
--- chrome/browser/cocoa/background_gradient_view.mm (revision 52179)
+++ chrome/browser/cocoa/background_gradient_view.mm (working copy)
@@ -31,8 +31,12 @@
[self setNeedsDisplay:YES];
}
+- (BOOL)drawsAsKey {
+ return [[self window] isKeyWindow];
+}
+
- (void)drawBackground {
- BOOL isKey = [[self window] isKeyWindow];
+ BOOL isKey = [self drawsAsKey];
ThemeProvider* themeProvider = [[self window] themeProvider];
if (themeProvider) {
NSColor* backgroundImageColor =
@@ -42,6 +46,8 @@
NSRectFill([self bounds]);
} else {
CGFloat winHeight = NSHeight([[self window] frame]);
+ if ([[self window] parentWindow])
+ winHeight = NSHeight([[[self window] parentWindow] frame]);
NSGradient* gradient = themeProvider->GetNSGradient(
isKey ? BrowserThemeProvider::GRADIENT_TOOLBAR :
BrowserThemeProvider::GRADIENT_TOOLBAR_INACTIVE);
@@ -69,7 +75,7 @@
}
- (NSColor*)strokeColor {
- BOOL isKey = [[self window] isKeyWindow];
+ BOOL isKey = [self drawsAsKey];
ThemeProvider* themeProvider = [[self window] themeProvider];
if (!themeProvider)
return [NSColor blackColor];
« no previous file with comments | « no previous file | chrome/browser/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698