| Index: ui/views/controls/label.h
|
| diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
|
| index 4be47262d47019f351674de2012d99ae58512059..2bea9ae2050bcad718ec9110e4cf02164c4e2bce 100644
|
| --- a/ui/views/controls/label.h
|
| +++ b/ui/views/controls/label.h
|
| @@ -26,25 +26,11 @@ namespace views {
|
| /////////////////////////////////////////////////////////////////////////////
|
| class VIEWS_EXPORT Label : public View {
|
| public:
|
| + // TODO(msw): Change to LEADING/TRAILING?
|
| enum Alignment { ALIGN_LEFT = 0,
|
| ALIGN_CENTER,
|
| ALIGN_RIGHT };
|
|
|
| - // The following enum is used to indicate whether using the Chrome UI's
|
| - // directionality as the label's directionality, or auto-detecting the label's
|
| - // directionality.
|
| - //
|
| - // If the label text originates from the Chrome UI, we should use the Chrome
|
| - // UI's directionality as the label's directionality.
|
| - //
|
| - // If the text originates from a web page, its directionality is determined
|
| - // based on its first character with strong directionality, disregarding what
|
| - // directionality the Chrome UI is.
|
| - enum DirectionalityMode {
|
| - USE_UI_DIRECTIONALITY = 0,
|
| - AUTO_DETECT_DIRECTIONALITY
|
| - };
|
| -
|
| // The view class name.
|
| static const char kViewClassName[];
|
|
|
| @@ -100,29 +86,12 @@ class VIEWS_EXPORT Label : public View {
|
| // Disables shadows.
|
| void ClearEmbellishing();
|
|
|
| - // Sets horizontal alignment. If the locale is RTL, and the directionality
|
| - // mode is USE_UI_DIRECTIONALITY, the alignment is flipped around.
|
| - //
|
| - // Caveat: for labels originating from a web page, the directionality mode
|
| - // should be reset to AUTO_DETECT_DIRECTIONALITY before the horizontal
|
| - // alignment is set. Otherwise, the label's alignment specified as a parameter
|
| - // will be flipped in RTL locales.
|
| + // Sets horizontal alignment; if the text is RTL, the alignment is flipped.
|
| + // TODO(msw): Key off of text or UI directionality???
|
| void SetHorizontalAlignment(Alignment alignment);
|
|
|
| Alignment horizontal_alignment() const { return horiz_alignment_; }
|
|
|
| - // Sets the directionality mode. The directionality mode is initialized to
|
| - // USE_UI_DIRECTIONALITY when the label is constructed. USE_UI_DIRECTIONALITY
|
| - // applies to every label that originates from the Chrome UI. However, if the
|
| - // label originates from a web page, its directionality is auto-detected.
|
| - void set_directionality_mode(DirectionalityMode mode) {
|
| - directionality_mode_ = mode;
|
| - }
|
| -
|
| - DirectionalityMode directionality_mode() const {
|
| - return directionality_mode_;
|
| - }
|
| -
|
| // Sets whether the label text can wrap on multiple lines.
|
| // Default is false.
|
| void SetMultiLine(bool multi_line);
|
| @@ -279,10 +248,6 @@ class VIEWS_EXPORT Label : public View {
|
| scoped_ptr<Background> mouse_over_background_;
|
| // Whether to collapse the label when it's not visible.
|
| bool collapse_when_hidden_;
|
| - // The following member variable is used to control whether the
|
| - // directionality is auto-detected based on first strong directionality
|
| - // character or is determined by chrome UI's locale.
|
| - DirectionalityMode directionality_mode_;
|
| // When embedded in a larger control that is focusable, setting this flag
|
| // allows this view to be painted as focused even when it is itself not.
|
| bool paint_as_focused_;
|
|
|