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

Side by Side Diff: ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.mm

Issue 2606353004: Fix iOS omnibox append button highlighted icon for RTL (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.h" 5 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/objc_property_releaser.h" 8 #include "base/mac/objc_property_releaser.h"
9 #import "ios/chrome/browser/ui/omnibox/truncating_attributed_label.h" 9 #import "ios/chrome/browser/ui/omnibox/truncating_attributed_label.h"
10 #include "ios/chrome/browser/ui/rtl_geometry.h" 10 #include "ios/chrome/browser/ui/rtl_geometry.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 - (void)updateAppendButtonImages { 156 - (void)updateAppendButtonImages {
157 int appendResourceID = _incognito 157 int appendResourceID = _incognito
158 ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO 158 ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO
159 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND; 159 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND;
160 UIImage* appendImage = NativeReversableImage(appendResourceID, YES); 160 UIImage* appendImage = NativeReversableImage(appendResourceID, YES);
161 161
162 [_appendButton setImage:appendImage forState:UIControlStateNormal]; 162 [_appendButton setImage:appendImage forState:UIControlStateNormal];
163 int appendSelectedResourceID = 163 int appendSelectedResourceID =
164 _incognito ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO_HIGHLIGHTED 164 _incognito ? IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO_HIGHLIGHTED
165 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_HIGHLIGHTED; 165 : IDR_IOS_OMNIBOX_KEYBOARD_VIEW_APPEND_HIGHLIGHTED;
166 UIImage* appendImageSelected = NativeImage(appendSelectedResourceID); 166 UIImage* appendImageSelected =
167 NativeReversableImage(appendSelectedResourceID, YES);
167 [_appendButton setImage:appendImageSelected 168 [_appendButton setImage:appendImageSelected
168 forState:UIControlStateHighlighted]; 169 forState:UIControlStateHighlighted];
169 } 170 }
170 171
171 - (NSString*)accessibilityLabel { 172 - (NSString*)accessibilityLabel {
172 return _textTruncatingLabel.attributedText.string; 173 return _textTruncatingLabel.attributedText.string;
173 } 174 }
174 175
175 - (NSString*)accessibilityValue { 176 - (NSString*)accessibilityValue {
176 return _detailTruncatingLabel.attributedText.string; 177 return _detailTruncatingLabel.attributedText.string;
177 } 178 }
178 179
179 @end 180 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698