| OLD | NEW |
| 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 "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 int left_margin = 0; | 237 int left_margin = 0; |
| 238 int right_margin = 0; | 238 int right_margin = 0; |
| 239 if (base::i18n::IsRTL()) | 239 if (base::i18n::IsRTL()) |
| 240 right_margin = margin; | 240 right_margin = margin; |
| 241 else | 241 else |
| 242 left_margin = margin; | 242 left_margin = margin; |
| 243 text_label_->set_border( | 243 text_label_->set_border( |
| 244 views::Border::CreateEmptyBorder(5, left_margin, 5, right_margin)); | 244 views::Border::CreateEmptyBorder(5, left_margin, 5, right_margin)); |
| 245 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 245 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 246 text_label_->SetFont(text_label_->font().DeriveFont(0, style)); | 246 text_label_->SetFont(text_label_->font().DeriveFont(0, style)); |
| 247 text_label_->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0)); | 247 // Do not set alpha value in disable color. It will have issue with elide |
| 248 // blending filter in disabled state for rendering label text color. |
| 249 text_label_->SetDisabledColor(SkColorSetARGB(255, 127, 127, 127)); |
| 248 if (text_default_color_) | 250 if (text_default_color_) |
| 249 text_label_->SetEnabledColor(text_default_color_); | 251 text_label_->SetEnabledColor(text_default_color_); |
| 250 AddChildView(text_label_); | 252 AddChildView(text_label_); |
| 251 | 253 |
| 252 SetAccessibleName(text); | 254 SetAccessibleName(text); |
| 253 return text_label_; | 255 return text_label_; |
| 254 } | 256 } |
| 255 | 257 |
| 256 views::Label* HoverHighlightView::AddCheckableLabel(const string16& text, | 258 views::Label* HoverHighlightView::AddCheckableLabel(const string16& text, |
| 257 gfx::Font::FontStyle style, | 259 gfx::Font::FontStyle style, |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 tray_view->set_border(views::Border::CreateEmptyBorder( | 730 tray_view->set_border(views::Border::CreateEmptyBorder( |
| 729 kTrayLabelItemVerticalPaddingVeriticalAlignment, | 731 kTrayLabelItemVerticalPaddingVeriticalAlignment, |
| 730 horizontal_padding, | 732 horizontal_padding, |
| 731 kTrayLabelItemVerticalPaddingVeriticalAlignment, | 733 kTrayLabelItemVerticalPaddingVeriticalAlignment, |
| 732 horizontal_padding)); | 734 horizontal_padding)); |
| 733 } | 735 } |
| 734 } | 736 } |
| 735 | 737 |
| 736 } // namespace internal | 738 } // namespace internal |
| 737 } // namespace ash | 739 } // namespace ash |
| OLD | NEW |