OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_popup_utils.h" | 5 #include "ash/system/tray/tray_popup_utils.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 tri_view->SetContainerLayout( | 167 tri_view->SetContainerLayout( |
168 TriView::Container::CENTER, | 168 TriView::Container::CENTER, |
169 CreateDefaultLayoutManager(TriView::Container::CENTER)); | 169 CreateDefaultLayoutManager(TriView::Container::CENTER)); |
170 tri_view->SetContainerLayout( | 170 tri_view->SetContainerLayout( |
171 TriView::Container::END, | 171 TriView::Container::END, |
172 CreateDefaultLayoutManager(TriView::Container::END)); | 172 CreateDefaultLayoutManager(TriView::Container::END)); |
173 | 173 |
174 return tri_view; | 174 return tri_view; |
175 } | 175 } |
176 | 176 |
177 TriView* TrayPopupUtils::CreateSubHeaderRowView() { | 177 TriView* TrayPopupUtils::CreateSubHeaderRowView(bool hide_start) { |
tdanderson
2017/04/24 15:43:39
I see you have made mention of this in your CL des
mohsen
2017/04/25 05:10:01
Well, I was not thinking of deleting this. Thought
| |
178 TriView* tri_view = CreateMultiTargetRowView(); | 178 TriView* tri_view = CreateMultiTargetRowView(); |
179 tri_view->SetInsets(gfx::Insets(0, kTrayPopupPaddingHorizontal, 0, 0)); | 179 if (hide_start) { |
180 tri_view->SetContainerVisible(TriView::Container::START, false); | 180 tri_view->SetInsets(gfx::Insets(0, kTrayPopupPaddingHorizontal, 0, 0)); |
181 tri_view->SetContainerVisible(TriView::Container::START, false); | |
182 } | |
181 tri_view->SetContainerLayout( | 183 tri_view->SetContainerLayout( |
182 TriView::Container::END, | 184 TriView::Container::END, |
183 CreateDefaultLayoutManager(TriView::Container::END)); | 185 CreateDefaultLayoutManager(TriView::Container::END)); |
184 return tri_view; | 186 return tri_view; |
185 } | 187 } |
186 | 188 |
187 views::View* TrayPopupUtils::CreateInfoLabelRowView(int message_id) { | 189 views::View* TrayPopupUtils::CreateInfoLabelRowView(int message_id) { |
188 views::Label* label = TrayPopupUtils::CreateDefaultLabel(); | 190 views::Label* label = TrayPopupUtils::CreateDefaultLabel(); |
189 label->SetText(l10n_util::GetStringUTF16(message_id)); | 191 label->SetText(l10n_util::GetStringUTF16(message_id)); |
190 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SYSTEM_INFO); | 192 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SYSTEM_INFO); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
456 | 458 |
457 void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container, | 459 void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container, |
458 bool visible) { | 460 bool visible) { |
459 container->SetRightViewVisible(visible); | 461 container->SetRightViewVisible(visible); |
460 container->SetAccessiblityState( | 462 container->SetAccessiblityState( |
461 visible ? HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX | 463 visible ? HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX |
462 : HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); | 464 : HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); |
463 } | 465 } |
464 | 466 |
465 } // namespace ash | 467 } // namespace ash |
OLD | NEW |