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/system/tray/tray_constants.h" | 7 #include "ash/system/tray/tray_constants.h" |
8 #include "ash/system/tray/tray_item_view.h" | 8 #include "ash/system/tray/tray_item_view.h" |
9 #include "grit/ash_strings.h" | 9 #include "grit/ash_strings.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 text_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 211 text_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
212 text_label_->SetFont(text_label_->font().DeriveFont(0, style)); | 212 text_label_->SetFont(text_label_->font().DeriveFont(0, style)); |
213 text_label_->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0)); | 213 text_label_->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0)); |
214 if (text_default_color_) | 214 if (text_default_color_) |
215 text_label_->SetEnabledColor(text_default_color_); | 215 text_label_->SetEnabledColor(text_default_color_); |
216 AddChildView(text_label_); | 216 AddChildView(text_label_); |
217 | 217 |
218 SetAccessibleName(text); | 218 SetAccessibleName(text); |
219 } | 219 } |
220 | 220 |
221 bool HoverHighlightView::PerformAction(const views::Event& event) { | 221 bool HoverHighlightView::PerformAction(const ui::Event& event) { |
222 if (!listener_) | 222 if (!listener_) |
223 return false; | 223 return false; |
224 listener_->ClickedOn(this); | 224 listener_->ClickedOn(this); |
225 return true; | 225 return true; |
226 } | 226 } |
227 | 227 |
228 gfx::Size HoverHighlightView::GetPreferredSize() { | 228 gfx::Size HoverHighlightView::GetPreferredSize() { |
229 gfx::Size size = ActionableView::GetPreferredSize(); | 229 gfx::Size size = ActionableView::GetPreferredSize(); |
230 if (fixed_height_) | 230 if (fixed_height_) |
231 size.set_height(fixed_height_); | 231 size.set_height(fixed_height_); |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 tray_view->set_border(views::Border::CreateEmptyBorder( | 652 tray_view->set_border(views::Border::CreateEmptyBorder( |
653 kTrayLabelItemVerticalPaddingVeriticalAlignment, | 653 kTrayLabelItemVerticalPaddingVeriticalAlignment, |
654 horizontal_padding, | 654 horizontal_padding, |
655 kTrayLabelItemVerticalPaddingVeriticalAlignment, | 655 kTrayLabelItemVerticalPaddingVeriticalAlignment, |
656 horizontal_padding)); | 656 horizontal_padding)); |
657 } | 657 } |
658 } | 658 } |
659 | 659 |
660 } // namespace internal | 660 } // namespace internal |
661 } // namespace ash | 661 } // namespace ash |
OLD | NEW |