diff options
| author | Gord Allott <gord.allott@canonical.com> | 2010-08-24 17:54:37 +0100 |
|---|---|---|
| committer | Gord Allott <gord.allott@canonical.com> | 2010-08-24 17:54:37 +0100 |
| commit | 506743d2a4cf647c406d130d0696a402f338e294 (patch) | |
| tree | 627a0da6e19c97b3d36284d056c991fb2adc9023 /unity-private | |
| parent | 40e3a3e3804a0a8c63ca76574ec597d9306f81b4 (diff) | |
make sure scroller flings after a launcher pops out
(bzr r433.6.7)
Diffstat (limited to 'unity-private')
| -rw-r--r-- | unity-private/launcher/scroller-view.vala | 10 | ||||
| -rw-r--r-- | unity-private/launcher/scrollerchild-controller.vala | 7 |
2 files changed, 7 insertions, 10 deletions
diff --git a/unity-private/launcher/scroller-view.vala b/unity-private/launcher/scroller-view.vala index b3bd1e08c..37d13a3fd 100644 --- a/unity-private/launcher/scroller-view.vala +++ b/unity-private/launcher/scroller-view.vala @@ -193,6 +193,8 @@ namespace Unity.Launcher is_scrolling = false; Clutter.ungrab_pointer (); get_stage ().motion_event.disconnect (on_motion_event); + current_phase = ScrollerPhase.FLUNG; + fling_timeline.start (); animate (Clutter.AnimationMode.EASE_OUT_SINE, 150, "drag-indicator-opacity", 1.0f); @@ -1468,14 +1470,6 @@ namespace Unity.Launcher if (!child.do_not_render) ; child.allocate (child_box, flags); -/* - child.remove_clip (); - if (child_box.y1 < 0) - child.set_clip (0, Math.fabsf (child_box.y1), - child_box.get_width (), child_box.get_height () - child_box.y1); -*/ - - total_child_height += child_height + spacing; if (index >= 0 && index <= 9) diff --git a/unity-private/launcher/scrollerchild-controller.vala b/unity-private/launcher/scrollerchild-controller.vala index e0e520ba5..e187fcbdd 100644 --- a/unity-private/launcher/scrollerchild-controller.vala +++ b/unity-private/launcher/scrollerchild-controller.vala @@ -227,8 +227,11 @@ namespace Unity.Launcher if (button_down && drag_controller.is_dragging == false && can_drag ()) { float diff = Math.fabsf (event.motion.x - click_start_pos_x); - child.grabbed_push = Math.powf (diff, 0.5f); - child.queue_relayout (); + if (event.motion.x - click_start_pos_x > 0) + { + child.grabbed_push = Math.powf (diff, 0.5f); + child.queue_relayout (); + } if (diff > drag_sensitivity) { child.grabbed_push = 0; |
