summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 23:04:08 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 23:04:08 +0000
commiteb789fdc0ec3f6a621b3954d4d3626b92e3d5c0e (patch)
tree6c32dbc2618c8dbcff81afac55a742a26a1489fe /chrome/browser/cocoa
parent0b4a4d2c893f41a0f3b499f0a2f1f9585688fbd1 (diff)
downloadchromium_src-eb789fdc0ec3f6a621b3954d4d3626b92e3d5c0e.zip
chromium_src-eb789fdc0ec3f6a621b3954d4d3626b92e3d5c0e.tar.gz
chromium_src-eb789fdc0ec3f6a621b3954d4d3626b92e3d5c0e.tar.bz2
[Mac] PDF icons for omnibox.
Replaces the various resources used for omnibox icons with PDF images. The use of copies is because the field is flipped while the popup is unflipped (and the icons get flipped to match). BUG=37865 TEST=Icons don't look suck, look awesome when scale factor is changed under Quartz Debug. Review URL: http://codereview.chromium.org/1629010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field_cell.mm4
-rw-r--r--chrome/browser/cocoa/location_bar_view_mac.mm7
2 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field_cell.mm b/chrome/browser/cocoa/autocomplete_text_field_cell.mm
index ae86541..ab9f7c8 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_cell.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_cell.mm
@@ -183,8 +183,8 @@ NSAttributedString* AttributedStringForImage(NSImage* anImage,
width -= 2 * kEditorHorizontalInset;
// Get the magnifying glass to put at the front of the string.
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- NSImage* image = rb.GetNSImageNamed(IDR_OMNIBOX_SEARCH);
+ NSImage* image =
+ AutocompleteEditViewMac::ImageForResource(IDR_OMNIBOX_SEARCH);
const NSSize imageSize = [image size];
// Based on what fits, choose |fullString| with the image,
diff --git a/chrome/browser/cocoa/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar_view_mac.mm
index 721fc7a..37a55c2 100644
--- a/chrome/browser/cocoa/location_bar_view_mac.mm
+++ b/chrome/browser/cocoa/location_bar_view_mac.mm
@@ -488,7 +488,8 @@ void LocationBarViewMac::SetIcon(int resource_id) {
!edit_view_->model()->is_keyword_hint()) {
location_icon_view_.SetVisible(false);
} else {
- location_icon_view_.SetIcon(resource_id);
+ NSImage* image = AutocompleteEditViewMac::ImageForResource(resource_id);
+ location_icon_view_.SetImage(image);
location_icon_view_.SetVisible(true);
SetSecurityLabel();
}
@@ -658,11 +659,11 @@ LocationBarViewMac::StarIconView::StarIconView(CommandUpdater* command_updater)
void LocationBarViewMac::StarIconView::SetStarred(bool starred) {
if (starred) {
- SetIcon(IDR_OMNIBOX_STAR_LIT);
+ SetImage(AutocompleteEditViewMac::ImageForResource(IDR_OMNIBOX_STAR_LIT));
tooltip_.reset(
[l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_STARRED) retain]);
} else {
- SetIcon(IDR_OMNIBOX_STAR);
+ SetImage(AutocompleteEditViewMac::ImageForResource(IDR_OMNIBOX_STAR));
tooltip_.reset(
[l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_STAR) retain]);
}