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

Side by Side Diff: chrome/browser/cocoa/bookmark_bar_folder_window.mm

Issue 1709004: size --> cellSize adjustment (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/bookmark_bar_folder_window.h" 5 #import "chrome/browser/cocoa/bookmark_bar_folder_window.h"
6 6
7 #import "base/logging.h"
7 #import "base/scoped_nsobject.h" 8 #import "base/scoped_nsobject.h"
9 #import "chrome/browser/cocoa/bookmark_bar_folder_controller.h"
8 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" 10 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
9 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" 11 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
10 12
11 13
12 @implementation BookmarkBarFolderWindow 14 @implementation BookmarkBarFolderWindow
13 15
14 - (id)initWithContentRect:(NSRect)contentRect 16 - (id)initWithContentRect:(NSRect)contentRect
15 styleMask:(NSUInteger)windowStyle 17 styleMask:(NSUInteger)windowStyle
16 backing:(NSBackingStoreType)bufferingType 18 backing:(NSBackingStoreType)bufferingType
17 defer:(BOOL)deferCreation { 19 defer:(BOOL)deferCreation {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 scoped_nsobject<NSGradient> gradient( 67 scoped_nsobject<NSGradient> gradient(
66 [[NSGradient alloc] initWithColorsAndLocations:startColor, 0.0, 68 [[NSGradient alloc] initWithColorsAndLocations:startColor, 0.0,
67 midColor, 0.25, 69 midColor, 0.25,
68 endColor, 0.5, 70 endColor, 0.5,
69 glowColor, 0.75, 71 glowColor, 0.75,
70 nil]); 72 nil]);
71 [gradient drawInBezierPath:bezier angle:0.0]; 73 [gradient drawInBezierPath:bezier angle:0.0];
72 } 74 }
73 75
74 @end 76 @end
77
78
79 @implementation BookmarkBarFolderWindowScrollView
80
81 // We want "draw background" of the NSScrollView in the xib to be NOT
82 // checked. That allows us to round the bottom corners of the folder
83 // window. However that also allows some scrollWheel: events to leak
84 // into the NSWindow behind it (even in a different application).
85 // Better to plug the scroll leak than to round corners for M5.
86 - (void)scrollWheel:(NSEvent *)theEvent {
87 DCHECK([[[self window] windowController]
88 respondsToSelector:@selector(scrollWheel:)]);
89 [[[self window] windowController] scrollWheel:theEvent];
90 }
91
92
93 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_folder_window.h ('k') | chrome/browser/cocoa/bookmark_bar_folder_window_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698