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

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

Issue 165499: Updates to clean up default theme and add hover states (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/download_item_cell.h" 5 #import "chrome/browser/cocoa/download_item_cell.h"
6 6
7 #include "app/gfx/canvas_paint.h" 7 #include "app/gfx/canvas_paint.h"
8 #include "app/gfx/text_elider.h" 8 #include "app/gfx/text_elider.h"
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/mac_util.h" 10 #include "base/mac_util.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 rightRoundedPath:radius inRect:dropdownDrawRect]; 326 rightRoundedPath:radius inRect:dropdownDrawRect];
327 NSBezierPath* dropdownOuterPath = [self 327 NSBezierPath* dropdownOuterPath = [self
328 rightRoundedPath:(radius + 1) 328 rightRoundedPath:(radius + 1)
329 inRect:NSInsetRect(dropdownDrawRect, -1, -1)]; 329 inRect:NSInsetRect(dropdownDrawRect, -1, -1)];
330 330
331 // Stroke the borders and appropriate fill gradient. 331 // Stroke the borders and appropriate fill gradient.
332 [self drawBorderAndFillForTheme:theme 332 [self drawBorderAndFillForTheme:theme
333 controlView:controlView 333 controlView:controlView
334 outerPath:buttonOuterPath 334 outerPath:buttonOuterPath
335 innerPath:buttonInnerPath 335 innerPath:buttonInnerPath
336 showClickedGradient:[self isButtonPartPressed]
336 showHighlightGradient:[self isMouseOverButtonPart] 337 showHighlightGradient:[self isMouseOverButtonPart]
337 showClickedGradient:[self isButtonPartPressed] 338 hoverAlpha:0.0
338 active:active 339 active:active
339 cellFrame:cellFrame]; 340 cellFrame:cellFrame];
340 341
341 [self drawBorderAndFillForTheme: theme 342 [self drawBorderAndFillForTheme: theme
342 controlView:controlView 343 controlView:controlView
343 outerPath:dropdownOuterPath 344 outerPath:dropdownOuterPath
344 innerPath:dropdownInnerPath 345 innerPath:dropdownInnerPath
346 showClickedGradient:[self isDropdownPartPressed]
345 showHighlightGradient:[self isMouseOverDropdownPart] 347 showHighlightGradient:[self isMouseOverDropdownPart]
346 showClickedGradient:[self isDropdownPartPressed] 348 hoverAlpha:0.0
347 active:active 349 active:active
348 cellFrame:cellFrame]; 350 cellFrame:cellFrame];
349 351
350 [self drawInteriorWithFrame:innerFrame inView:controlView]; 352 [self drawInteriorWithFrame:innerFrame inView:controlView];
351 } 353 }
352 354
353 - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { 355 - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
354 // Draw title 356 // Draw title
355 [self elideTitle:cellFrame.size.width - 357 [self elideTitle:cellFrame.size.width -
356 (kTextPosLeft + kTextPaddingRight + kDropdownAreaWidth)]; 358 (kTextPosLeft + kTextPaddingRight + kDropdownAreaWidth)];
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 507 }
506 return self; 508 return self;
507 } 509 }
508 510
509 - (void)setCurrentProgress:(NSAnimationProgress)progress { 511 - (void)setCurrentProgress:(NSAnimationProgress)progress {
510 [super setCurrentProgress:progress]; 512 [super setCurrentProgress:progress];
511 [cell_ animation:self progressed:progress]; 513 [cell_ animation:self progressed:progress];
512 } 514 }
513 515
514 @end 516 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller_unittest.mm ('k') | chrome/browser/cocoa/gradient_button_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698