| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/app_list/views/app_list_item_view.h" | 5 #include "ui/app_list/views/app_list_item_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 title_(new views::Label), | 80 title_(new views::Label), |
| 81 progress_bar_(new views::ProgressBar), | 81 progress_bar_(new views::ProgressBar), |
| 82 ui_state_(UI_STATE_NORMAL), | 82 ui_state_(UI_STATE_NORMAL), |
| 83 touch_dragging_(false), | 83 touch_dragging_(false), |
| 84 shadow_animator_(this), | 84 shadow_animator_(this), |
| 85 is_installing_(false), | 85 is_installing_(false), |
| 86 is_highlighted_(false) { | 86 is_highlighted_(false) { |
| 87 shadow_animator_.animation()->SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN); | 87 shadow_animator_.animation()->SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN); |
| 88 shadow_animator_.SetStartAndEndShadows(IconStartShadows(), IconEndShadows()); | 88 shadow_animator_.SetStartAndEndShadows(IconStartShadows(), IconEndShadows()); |
| 89 | 89 |
| 90 icon_->set_interactive(false); | 90 icon_->set_can_process_events_within_subtree(false); |
| 91 icon_->SetVerticalAlignment(views::ImageView::LEADING); | 91 icon_->SetVerticalAlignment(views::ImageView::LEADING); |
| 92 | 92 |
| 93 title_->SetBackgroundColor(0); | 93 title_->SetBackgroundColor(0); |
| 94 title_->SetAutoColorReadabilityEnabled(false); | 94 title_->SetAutoColorReadabilityEnabled(false); |
| 95 title_->SetEnabledColor(kGridTitleColor); | 95 title_->SetEnabledColor(kGridTitleColor); |
| 96 title_->SetHandlesTooltips(false); | 96 title_->SetHandlesTooltips(false); |
| 97 | 97 |
| 98 static const gfx::FontList font_list = GetFontList(); | 98 static const gfx::FontList font_list = GetFontList(); |
| 99 title_->SetFontList(font_list); | 99 title_->SetFontList(font_list); |
| 100 title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 100 title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 SetItemPercentDownloaded(item_weak_->percent_downloaded()); | 515 SetItemPercentDownloaded(item_weak_->percent_downloaded()); |
| 516 } | 516 } |
| 517 | 517 |
| 518 void AppListItemView::ItemBeingDestroyed() { | 518 void AppListItemView::ItemBeingDestroyed() { |
| 519 DCHECK(item_weak_); | 519 DCHECK(item_weak_); |
| 520 item_weak_->RemoveObserver(this); | 520 item_weak_->RemoveObserver(this); |
| 521 item_weak_ = NULL; | 521 item_weak_ = NULL; |
| 522 } | 522 } |
| 523 | 523 |
| 524 } // namespace app_list | 524 } // namespace app_list |
| OLD | NEW |