| 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 "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 const int kTopPadding = 18; | 43 const int kTopPadding = 18; |
| 44 const int kIconTitleSpacing = 6; | 44 const int kIconTitleSpacing = 6; |
| 45 const int kProgressBarHorizontalPadding = 12; | 45 const int kProgressBarHorizontalPadding = 12; |
| 46 | 46 |
| 47 // Radius of the folder dropping preview circle. | 47 // Radius of the folder dropping preview circle. |
| 48 const int kFolderPreviewRadius = 40; | 48 const int kFolderPreviewRadius = 40; |
| 49 | 49 |
| 50 const int kLeftRightPaddingChars = 1; | 50 const int kLeftRightPaddingChars = 1; |
| 51 | 51 |
| 52 #if !defined(OS_WIN) |
| 52 // Scale to transform the icon when a drag starts. | 53 // Scale to transform the icon when a drag starts. |
| 53 const float kDraggingIconScale = 1.5f; | 54 const float kDraggingIconScale = 1.5f; |
| 55 #endif |
| 54 | 56 |
| 55 // Delay in milliseconds of when the dragging UI should be shown for mouse drag. | 57 // Delay in milliseconds of when the dragging UI should be shown for mouse drag. |
| 56 const int kMouseDragUIDelayInMs = 200; | 58 const int kMouseDragUIDelayInMs = 200; |
| 57 | 59 |
| 58 gfx::FontList GetFontList() { | 60 gfx::FontList GetFontList() { |
| 59 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 60 const gfx::FontList& font_list = rb.GetFontList(kItemTextFontStyle); | 62 const gfx::FontList& font_list = rb.GetFontList(kItemTextFontStyle); |
| 61 // The font is different on each platform. The font size is adjusted on some | 63 // The font is different on each platform. The font size is adjusted on some |
| 62 // platforms to keep a consistent look. | 64 // platforms to keep a consistent look. |
| 63 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 65 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 SetItemPercentDownloaded(item_weak_->percent_downloaded()); | 573 SetItemPercentDownloaded(item_weak_->percent_downloaded()); |
| 572 } | 574 } |
| 573 | 575 |
| 574 void AppListItemView::ItemBeingDestroyed() { | 576 void AppListItemView::ItemBeingDestroyed() { |
| 575 DCHECK(item_weak_); | 577 DCHECK(item_weak_); |
| 576 item_weak_->RemoveObserver(this); | 578 item_weak_->RemoveObserver(this); |
| 577 item_weak_ = NULL; | 579 item_weak_ = NULL; |
| 578 } | 580 } |
| 579 | 581 |
| 580 } // namespace app_list | 582 } // namespace app_list |
| OLD | NEW |