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

Side by Side Diff: ash/common/system/tray/special_popup_row.cc

Issue 2696033003: [Ash MD] Remove some non-MD code from HoverHighlightView (Closed)
Patch Set: Created 3 years, 10 months 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/common/system/tray/special_popup_row.h" 5 #include "ash/common/system/tray/special_popup_row.h"
6 6
7 #include "ash/common/ash_constants.h" 7 #include "ash/common/ash_constants.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/system/tray/hover_highlight_view.h" 9 #include "ash/common/system/tray/hover_highlight_view.h"
10 #include "ash/common/system/tray/throbber_view.h" 10 #include "ash/common/system/tray/throbber_view.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 SpecialPopupRow::~SpecialPopupRow() {} 56 SpecialPopupRow::~SpecialPopupRow() {}
57 57
58 void SpecialPopupRow::SetTextLabel(int string_id, ViewClickListener* listener) { 58 void SpecialPopupRow::SetTextLabel(int string_id, ViewClickListener* listener) {
59 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 59 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
60 HoverHighlightView* container = new HoverHighlightView(listener); 60 HoverHighlightView* container = new HoverHighlightView(listener);
61 container->SetLayoutManager(new views::BoxLayout( 61 container->SetLayoutManager(new views::BoxLayout(
62 views::BoxLayout::kHorizontal, 0, 3, kIconPaddingLeft)); 62 views::BoxLayout::kHorizontal, 0, 3, kIconPaddingLeft));
63 63
64 container->set_highlight_color(SkColorSetARGB(0, 0, 0, 0));
65 container->set_default_color(SkColorSetARGB(0, 0, 0, 0));
66 container->set_text_highlight_color(kHeaderTextColorHover);
67 container->set_text_default_color(kHeaderTextColorNormal);
68
69 container->AddIconAndLabel( 64 container->AddIconAndLabel(
70 *rb.GetImageNamed(IDR_AURA_UBER_TRAY_LESS).ToImageSkia(), 65 *rb.GetImageNamed(IDR_AURA_UBER_TRAY_LESS).ToImageSkia(),
71 rb.GetLocalizedString(string_id), true /* highlight */); 66 rb.GetLocalizedString(string_id));
72 67
73 container->SetBorder( 68 container->SetBorder(
74 views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); 69 views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0));
75 70
76 container->SetAccessibleName( 71 container->SetAccessibleName(
77 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_PREVIOUS_MENU)); 72 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_PREVIOUS_MENU));
78 SetContent(container); 73 SetContent(container);
79 } 74 }
80 75
81 void SpecialPopupRow::SetContent(views::View* view) { 76 void SpecialPopupRow::SetContent(views::View* view) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 separator->SetColor(ash::kBorderDarkColor); 142 separator->SetColor(ash::kBorderDarkColor);
148 separator->SetBorder( 143 separator->SetBorder(
149 views::CreateEmptyBorder(kSeparatorInset, 0, kSeparatorInset, 0)); 144 views::CreateEmptyBorder(kSeparatorInset, 0, kSeparatorInset, 0));
150 views_after_content_container_->AddChildView(separator); 145 views_after_content_container_->AddChildView(separator);
151 } 146 }
152 147
153 views_after_content_container_->AddChildView(view); 148 views_after_content_container_->AddChildView(view);
154 } 149 }
155 150
156 } // namespace ash 151 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698