| 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 "grit/ui_strings.h" | 10 #include "grit/ui_strings.h" |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 apps_grid_view_->EndDrag(false); | 487 apps_grid_view_->EndDrag(false); |
| 488 event->SetHandled(); | 488 event->SetHandled(); |
| 489 } | 489 } |
| 490 break; | 490 break; |
| 491 case ui::ET_GESTURE_LONG_PRESS: | 491 case ui::ET_GESTURE_LONG_PRESS: |
| 492 if (!apps_grid_view_->has_dragged_view()) | 492 if (!apps_grid_view_->has_dragged_view()) |
| 493 SetTouchDragging(true); | 493 SetTouchDragging(true); |
| 494 event->SetHandled(); | 494 event->SetHandled(); |
| 495 break; | 495 break; |
| 496 case ui::ET_GESTURE_LONG_TAP: | 496 case ui::ET_GESTURE_LONG_TAP: |
| 497 case ui::ET_GESTURE_END: | |
| 498 if (touch_dragging_) | 497 if (touch_dragging_) |
| 499 SetTouchDragging(false); | 498 SetTouchDragging(false); |
| 500 break; | 499 break; |
| 501 default: | 500 default: |
| 502 break; | 501 break; |
| 503 } | 502 } |
| 504 if (!event->handled()) | 503 if (!event->handled()) |
| 505 CustomButton::OnGestureEvent(event); | 504 CustomButton::OnGestureEvent(event); |
| 506 } | 505 } |
| 507 | 506 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 524 const int left_right_padding = | 523 const int left_right_padding = |
| 525 title_->font_list().GetExpectedTextWidth(kLeftRightPaddingChars); | 524 title_->font_list().GetExpectedTextWidth(kLeftRightPaddingChars); |
| 526 rect.Inset(left_right_padding, kTopPadding, left_right_padding, 0); | 525 rect.Inset(left_right_padding, kTopPadding, left_right_padding, 0); |
| 527 | 526 |
| 528 gfx::Rect icon_bounds(rect.x(), rect.y(), rect.width(), icon_size_.height()); | 527 gfx::Rect icon_bounds(rect.x(), rect.y(), rect.width(), icon_size_.height()); |
| 529 icon_bounds.Inset(gfx::ShadowValue::GetMargin(icon_shadows_)); | 528 icon_bounds.Inset(gfx::ShadowValue::GetMargin(icon_shadows_)); |
| 530 return icon_bounds; | 529 return icon_bounds; |
| 531 } | 530 } |
| 532 | 531 |
| 533 } // namespace app_list | 532 } // namespace app_list |
| OLD | NEW |