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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 289 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
290 params.parent = | 290 params.parent = |
291 Shell::GetContainer(root_window_, ash::kShellWindowId_OverlayContainer); | 291 Shell::GetContainer(root_window_, ash::kShellWindowId_OverlayContainer); |
292 params.accept_events = false; | 292 params.accept_events = false; |
293 params.visible_on_all_workspaces = true; | 293 params.visible_on_all_workspaces = true; |
294 window_label_->set_focus_on_creation(false); | 294 window_label_->set_focus_on_creation(false); |
295 window_label_->Init(params); | 295 window_label_->Init(params); |
296 window_label_view_ = new views::Label; | 296 window_label_view_ = new views::Label; |
297 window_label_view_->SetEnabledColor(kLabelColor); | 297 window_label_view_->SetEnabledColor(kLabelColor); |
298 window_label_view_->SetBackgroundColor(kLabelBackground); | 298 window_label_view_->SetBackgroundColor(kLabelBackground); |
299 window_label_view_->set_shadows(gfx::ShadowValues(1, gfx::ShadowValue( | 299 window_label_view_->SetShadows(gfx::ShadowValues( |
300 gfx::Point(0, kVerticalShadowOffset), kShadowBlur, kLabelShadow))); | 300 1, |
| 301 gfx::ShadowValue( |
| 302 gfx::Point(0, kVerticalShadowOffset), kShadowBlur, kLabelShadow))); |
301 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 303 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
302 window_label_view_->SetFontList( | 304 window_label_view_->SetFontList( |
303 bundle.GetFontList(ui::ResourceBundle::BoldFont)); | 305 bundle.GetFontList(ui::ResourceBundle::BoldFont)); |
304 window_label_view_->SetText(title); | 306 window_label_view_->SetText(title); |
305 views::BoxLayout* layout = new views::BoxLayout(views::BoxLayout::kVertical, | 307 views::BoxLayout* layout = new views::BoxLayout(views::BoxLayout::kVertical, |
306 0, | 308 0, |
307 kVerticalLabelPadding, | 309 kVerticalLabelPadding, |
308 0); | 310 0); |
309 window_label_view_->SetLayoutManager(layout); | 311 window_label_view_->SetLayoutManager(layout); |
310 window_label_->SetContentsView(window_label_view_); | 312 window_label_->SetContentsView(window_label_view_); |
311 window_label_->Show(); | 313 window_label_->Show(); |
312 } | 314 } |
313 | 315 |
314 } // namespace ash | 316 } // namespace ash |
OLD | NEW |