| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 82 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 83 params.parent = | 83 params.parent = |
| 84 Shell::GetContainer(root_window, ash::kShellWindowId_OverlayContainer); | 84 Shell::GetContainer(root_window, ash::kShellWindowId_OverlayContainer); |
| 85 params.accept_events = false; | 85 params.accept_events = false; |
| 86 params.visible_on_all_workspaces = true; | 86 params.visible_on_all_workspaces = true; |
| 87 widget->set_focus_on_creation(false); | 87 widget->set_focus_on_creation(false); |
| 88 widget->Init(params); | 88 widget->Init(params); |
| 89 views::Label* label = new views::Label; | 89 views::Label* label = new views::Label; |
| 90 label->SetEnabledColor(kLabelColor); | 90 label->SetEnabledColor(kLabelColor); |
| 91 label->SetBackgroundColor(kLabelBackground); | 91 label->SetBackgroundColor(kLabelBackground); |
| 92 label->SetShadowColors(kLabelShadow, kLabelShadow); | 92 label->set_shadows(gfx::ShadowValues(1, gfx::ShadowValue( |
| 93 label->SetShadowOffset(0, kVerticalShadowOffset); | 93 gfx::Point(0, kVerticalShadowOffset), kShadowBlur, kLabelShadow))); |
| 94 label->set_shadow_blur(kShadowBlur); | |
| 95 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 94 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 96 label->SetFontList(bundle.GetFontList(ui::ResourceBundle::BoldFont)); | 95 label->SetFontList(bundle.GetFontList(ui::ResourceBundle::BoldFont)); |
| 97 label->SetText(title); | 96 label->SetText(title); |
| 98 views::BoxLayout* layout = new views::BoxLayout(views::BoxLayout::kVertical, | 97 views::BoxLayout* layout = new views::BoxLayout(views::BoxLayout::kVertical, |
| 99 0, | 98 0, |
| 100 kVerticalLabelPadding, | 99 kVerticalLabelPadding, |
| 101 0); | 100 0); |
| 102 label->SetLayoutManager(layout); | 101 label->SetLayoutManager(layout); |
| 103 widget->SetContentsView(label); | 102 widget->SetContentsView(label); |
| 104 widget->Show(); | 103 widget->Show(); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( | 288 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( |
| 290 ScopedTransformOverviewWindow::kTransitionMilliseconds)); | 289 ScopedTransformOverviewWindow::kTransitionMilliseconds)); |
| 291 window_label_->GetNativeWindow()->SetBounds(label_bounds); | 290 window_label_->GetNativeWindow()->SetBounds(label_bounds); |
| 292 } else { | 291 } else { |
| 293 window_label_->GetNativeWindow()->SetBounds(label_bounds); | 292 window_label_->GetNativeWindow()->SetBounds(label_bounds); |
| 294 } | 293 } |
| 295 } | 294 } |
| 296 } | 295 } |
| 297 | 296 |
| 298 } // namespace ash | 297 } // namespace ash |
| OLD | NEW |