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

Unified Diff: ui/views/controls/label.h

Issue 11377005: Replace Label::Alignment with gfx::HorizontalAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remaining Label::Alignment references. Created 8 years, 1 month 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 | « ui/views/controls/button/label_button_unittest.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.h
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index bd21766d2cd9121d30085b182593914d81c0114e..065a8d881770a3e136a44f15fc4e262c7588601f 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -12,6 +12,7 @@
#include "base/string16.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/font.h"
+#include "ui/gfx/text_constants.h"
#include "ui/views/view.h"
namespace views {
@@ -25,10 +26,6 @@ namespace views {
/////////////////////////////////////////////////////////////////////////////
class VIEWS_EXPORT Label : public View {
public:
- 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.
@@ -97,9 +94,11 @@ class VIEWS_EXPORT Label : public View {
// 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.
- void SetHorizontalAlignment(Alignment alignment);
+ void SetHorizontalAlignment(gfx::HorizontalAlignment alignment);
- Alignment horizontal_alignment() const { return horiz_alignment_; }
+ gfx::HorizontalAlignment horizontal_alignment() const {
+ return horizontal_alignment_;
+ }
// Sets the directionality mode. The directionality mode is initialized to
// USE_UI_DIRECTIONALITY when the label is constructed. USE_UI_DIRECTIONALITY
@@ -227,7 +226,7 @@ class VIEWS_EXPORT Label : public View {
bool is_multi_line_;
bool allow_character_break_;
ElideBehavior elide_behavior_;
- Alignment horiz_alignment_;
+ gfx::HorizontalAlignment horizontal_alignment_;
string16 tooltip_text_;
// Whether to collapse the label when it's not visible.
bool collapse_when_hidden_;
« no previous file with comments | « ui/views/controls/button/label_button_unittest.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698