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

Side by Side Diff: ios/chrome/browser/ui/omnibox/truncating_attributed_label.h

Issue 2854893002: Force URLs in omnibox suggestions to layout LTR. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_TRUNCATING_ATTRIBUTED_LABEL_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_TRUNCATING_ATTRIBUTED_LABEL_H_
6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_TRUNCATING_ATTRIBUTED_LABEL_H_ 6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_TRUNCATING_ATTRIBUTED_LABEL_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 11
12 typedef enum { 12 typedef enum {
13 OmniboxPopupTruncatingTail = 0x1, 13 OmniboxPopupTruncatingTail = 0x1,
14 OmniboxPopupTruncatingHead = 0x2, 14 OmniboxPopupTruncatingHead = 0x2,
15 OmniboxPopupTruncatingHeadAndTail = 15 OmniboxPopupTruncatingHeadAndTail =
16 OmniboxPopupTruncatingHead | OmniboxPopupTruncatingTail 16 OmniboxPopupTruncatingHead | OmniboxPopupTruncatingTail
17 } OmniboxPopupTruncatingMode; 17 } OmniboxPopupTruncatingMode;
18 18
19 // A label which applies a fade-to-background color gradient to one or both ends 19 // A label which applies a fade-to-background color gradient to one or both ends
20 // of the string if it is too large to fit the available area. It is based on 20 // of the string if it is too large to fit the available area. It is based on
21 // GTMFadeTruncatingLabel but uses the attributedText property of UILabel rather 21 // GTMFadeTruncatingLabel but uses the attributedText property of UILabel rather
22 // than the text and font properties. 22 // than the text and font properties.
23 @interface OmniboxPopupTruncatingLabel : UILabel 23 @interface OmniboxPopupTruncatingLabel : UILabel
24 24
25 // Which side(s) to truncate. 25 // Which side(s) to truncate.
26 @property(nonatomic, assign) OmniboxPopupTruncatingMode truncateMode; 26 @property(nonatomic, assign) OmniboxPopupTruncatingMode truncateMode;
27 27
28 // Whether the text being displayed should be treated as a URL.
29 @property(nonatomic, assign) BOOL displayAsURL;
rohitrao (ping after 24h) 2017/05/03 16:19:37 Total nit: would something like "forceLTR" be a be
Justin Donnelly 2017/05/03 17:35:52 Your suggestion makes sense but I'm interested in
30
28 @end 31 @end
29 32
30 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_TRUNCATING_ATTRIBUTED_LABEL_H_ 33 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_TRUNCATING_ATTRIBUTED_LABEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698