| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 window_label_button_view_->SetBorder(views::Border::NullBorder()); | 415 window_label_button_view_->SetBorder(views::Border::NullBorder()); |
| 416 window_label_button_view_->SetTextColor(views::LabelButton::STATE_NORMAL, | 416 window_label_button_view_->SetTextColor(views::LabelButton::STATE_NORMAL, |
| 417 kLabelColor); | 417 kLabelColor); |
| 418 window_label_button_view_->SetTextColor(views::LabelButton::STATE_HOVERED, | 418 window_label_button_view_->SetTextColor(views::LabelButton::STATE_HOVERED, |
| 419 kLabelColor); | 419 kLabelColor); |
| 420 window_label_button_view_->SetTextColor(views::LabelButton::STATE_PRESSED, | 420 window_label_button_view_->SetTextColor(views::LabelButton::STATE_PRESSED, |
| 421 kLabelColor); | 421 kLabelColor); |
| 422 window_label_button_view_->set_animate_on_state_change(false); | 422 window_label_button_view_->set_animate_on_state_change(false); |
| 423 window_label_button_view_->SetHorizontalAlignment(gfx::ALIGN_CENTER); | 423 window_label_button_view_->SetHorizontalAlignment(gfx::ALIGN_CENTER); |
| 424 window_label_button_view_->SetTextShadows(gfx::ShadowValues( | 424 window_label_button_view_->SetTextShadows(gfx::ShadowValues( |
| 425 1, gfx::ShadowValue(gfx::Point(0, kVerticalShadowOffset), kShadowBlur, | 425 1, gfx::ShadowValue(gfx::Vector2d(0, kVerticalShadowOffset), kShadowBlur, |
| 426 kLabelShadow))); | 426 kLabelShadow))); |
| 427 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 427 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 428 window_label_button_view_->SetFontList( | 428 window_label_button_view_->SetFontList( |
| 429 bundle.GetFontList(ui::ResourceBundle::BoldFont)); | 429 bundle.GetFontList(ui::ResourceBundle::BoldFont)); |
| 430 window_label_->SetContentsView(window_label_button_view_); | 430 window_label_->SetContentsView(window_label_button_view_); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void WindowSelectorItem::UpdateCloseButtonLayout( | 433 void WindowSelectorItem::UpdateCloseButtonLayout( |
| 434 OverviewAnimationType animation_type) { | 434 OverviewAnimationType animation_type) { |
| 435 if (!close_button_->visible()) { | 435 if (!close_button_->visible()) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 454 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16( | 454 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16( |
| 455 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME, | 455 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME, |
| 456 GetWindow()->title())); | 456 GetWindow()->title())); |
| 457 } | 457 } |
| 458 | 458 |
| 459 int WindowSelectorItem::GetMinimumCloseDistance() const { | 459 int WindowSelectorItem::GetMinimumCloseDistance() const { |
| 460 return target_bounds_.size().width() / 2; | 460 return target_bounds_.size().width() / 2; |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace ash | 463 } // namespace ash |
| OLD | NEW |