Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/wm/overview/window_selector_item.h" | 5 #include "ash/wm/overview/window_selector_item.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/wm/overview/scoped_transform_overview_window.h" | 10 #include "ash/wm/overview/scoped_transform_overview_window.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 params.accept_events = false; | 49 params.accept_events = false; |
| 50 params.visible_on_all_workspaces = true; | 50 params.visible_on_all_workspaces = true; |
| 51 widget->set_focus_on_creation(false); | 51 widget->set_focus_on_creation(false); |
| 52 widget->Init(params); | 52 widget->Init(params); |
| 53 views::Label* label = new views::Label; | 53 views::Label* label = new views::Label; |
| 54 label->SetEnabledColor(kLabelColor); | 54 label->SetEnabledColor(kLabelColor); |
| 55 label->SetBackgroundColor(kLabelBackground); | 55 label->SetBackgroundColor(kLabelBackground); |
| 56 label->SetShadowColors(kLabelShadow, kLabelShadow); | 56 label->SetShadowColors(kLabelShadow, kLabelShadow); |
| 57 label->SetShadowOffset(0, kVerticalShadowOffset); | 57 label->SetShadowOffset(0, kVerticalShadowOffset); |
| 58 label->set_shadow_blur(kShadowBlur); | 58 label->set_shadow_blur(kShadowBlur); |
| 59 // TODO(dmassoni): Change to something more appropriate. | |
| 60 label->set_accessible_role(ui::AX_ROLE_BUTTON); | |
|
flackr
2014/05/29 20:04:25
I think it would be better if you used a LabelButt
Nina
2014/06/02 22:04:38
Modifying where we send the a11y alert made this c
| |
| 59 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 61 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 60 label->SetFontList(bundle.GetFontList(ui::ResourceBundle::BoldFont)); | 62 label->SetFontList(bundle.GetFontList(ui::ResourceBundle::BoldFont)); |
| 61 label->SetText(title); | 63 label->SetText(title); |
| 62 views::BoxLayout* layout = new views::BoxLayout(views::BoxLayout::kVertical, | 64 views::BoxLayout* layout = new views::BoxLayout(views::BoxLayout::kVertical, |
| 63 0, | 65 0, |
| 64 kVerticalLabelPadding, | 66 kVerticalLabelPadding, |
| 65 0); | 67 0); |
| 66 label->SetLayoutManager(layout); | 68 label->SetLayoutManager(layout); |
| 67 widget->SetContentsView(label); | 69 widget->SetContentsView(label); |
| 68 widget->Show(); | 70 widget->Show(); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 window_label_->GetNativeWindow()->layer()->GetAnimator()); | 149 window_label_->GetNativeWindow()->layer()->GetAnimator()); |
| 148 settings.SetPreemptionStrategy( | 150 settings.SetPreemptionStrategy( |
| 149 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 151 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 150 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 152 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
| 151 ScopedTransformOverviewWindow::kTransitionMilliseconds)); | 153 ScopedTransformOverviewWindow::kTransitionMilliseconds)); |
| 152 window_label_->GetNativeWindow()->SetBounds(label_bounds); | 154 window_label_->GetNativeWindow()->SetBounds(label_bounds); |
| 153 } else { | 155 } else { |
| 154 window_label_->GetNativeWindow()->SetBounds(label_bounds); | 156 window_label_->GetNativeWindow()->SetBounds(label_bounds); |
| 155 } | 157 } |
| 156 } | 158 } |
| 157 | |
| 158 } | 159 } |
| 159 | 160 |
| 160 } // namespace ash | 161 } // namespace ash |
| OLD | NEW |