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

Side by Side Diff: ash/system/tray/tray_views.cc

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/power/power_status_view.cc ('k') | ash/system/tray_caps_lock.cc » ('j') | 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) 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 #include "ash/system/tray/tray_views.h" 5 #include "ash/system/tray/tray_views.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/system/tray/tray_constants.h" 8 #include "ash/system/tray/tray_constants.h"
9 #include "ash/system/tray/tray_item_view.h" 9 #include "ash/system/tray/tray_item_view.h"
10 #include "grit/ash_resources.h" 10 #include "grit/ash_resources.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 text_label_ = new views::Label(text); 208 text_label_ = new views::Label(text);
209 int margin = kTrayPopupPaddingHorizontal + kPopupDetailLabelExtraLeftMargin; 209 int margin = kTrayPopupPaddingHorizontal + kPopupDetailLabelExtraLeftMargin;
210 int left_margin = 0; 210 int left_margin = 0;
211 int right_margin = 0; 211 int right_margin = 0;
212 if (base::i18n::IsRTL()) 212 if (base::i18n::IsRTL())
213 right_margin = margin; 213 right_margin = margin;
214 else 214 else
215 left_margin = margin; 215 left_margin = margin;
216 text_label_->set_border( 216 text_label_->set_border(
217 views::Border::CreateEmptyBorder(5, left_margin, 5, right_margin)); 217 views::Border::CreateEmptyBorder(5, left_margin, 5, right_margin));
218 text_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 218 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
219 text_label_->SetFont(text_label_->font().DeriveFont(0, style)); 219 text_label_->SetFont(text_label_->font().DeriveFont(0, style));
220 text_label_->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0)); 220 text_label_->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0));
221 if (text_default_color_) 221 if (text_default_color_)
222 text_label_->SetEnabledColor(text_default_color_); 222 text_label_->SetEnabledColor(text_default_color_);
223 AddChildView(text_label_); 223 AddChildView(text_label_);
224 224
225 SetAccessibleName(text); 225 SetAccessibleName(text);
226 } 226 }
227 227
228 void HoverHighlightView::AddCheckableLabel(const string16& text, 228 void HoverHighlightView::AddCheckableLabel(const string16& text,
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 tray_view->set_border(views::Border::CreateEmptyBorder( 707 tray_view->set_border(views::Border::CreateEmptyBorder(
708 kTrayLabelItemVerticalPaddingVeriticalAlignment, 708 kTrayLabelItemVerticalPaddingVeriticalAlignment,
709 horizontal_padding, 709 horizontal_padding,
710 kTrayLabelItemVerticalPaddingVeriticalAlignment, 710 kTrayLabelItemVerticalPaddingVeriticalAlignment,
711 horizontal_padding)); 711 horizontal_padding));
712 } 712 }
713 } 713 }
714 714
715 } // namespace internal 715 } // namespace internal
716 } // namespace ash 716 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/power/power_status_view.cc ('k') | ash/system/tray_caps_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698