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

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

Issue 155851: Add theme support for the yellow star on the Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/browser/cocoa/gradient_button_cell.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/toolbar_controller.mm
===================================================================
--- chrome/browser/cocoa/toolbar_controller.mm (revision 21106)
+++ chrome/browser/cocoa/toolbar_controller.mm (working copy)
@@ -9,6 +9,7 @@
#include "chrome/app/chrome_dll_resource.h"
#import "chrome/browser/cocoa/autocomplete_text_field.h"
#import "chrome/browser/cocoa/autocomplete_text_field_editor.h"
+#import "chrome/browser/cocoa/gradient_button_cell.h"
#import "chrome/browser/cocoa/location_bar_view_mac.h"
#include "chrome/browser/cocoa/nsimage_cache.h"
#include "chrome/browser/profile.h"
@@ -19,8 +20,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
-// Names of images in the bundle for the star icon (normal and 'starred').
-static NSString* const kStarImageName = @"star_Template.pdf";
+// Name of image in the bundle for the yellow of the star icon.
static NSString* const kStarredImageName = @"starred.pdf";
@interface ToolbarController(Private)
@@ -169,16 +169,11 @@
}
- (void)setStarredState:(BOOL)isStarred {
- NSString* starImageName = kStarImageName;
- BOOL isTemplate = YES;
- if (isStarred) {
- starImageName = kStarredImageName;
- isTemplate = NO;
- }
- NSImage* starImage = nsimage_cache::ImageNamed(starImageName);
- if (isTemplate)
- [starImage setTemplate:YES];
- [starButton_ setImage:starImage];
+ NSImage* starImage = nil;
+ if (isStarred)
+ starImage = nsimage_cache::ImageNamed(kStarredImageName);
+
+ [(GradientButtonCell*)[starButton_ cell] setUnderlayImage:starImage];
}
- (void)setIsLoading:(BOOL)isLoading {
« no previous file with comments | « chrome/browser/cocoa/gradient_button_cell.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698