Merge lp:~brandontschaefer/unity/allow-outof-bounds-dragging-overlay-scrollbar into lp:unity

Proposed by Brandon Schaefer
Status: Superseded
Proposed branch: lp:~brandontschaefer/unity/allow-outof-bounds-dragging-overlay-scrollbar
Merge into: lp:unity
Diff against target: 34 lines (+5/-7)
1 file modified
unity-shared/PlacesOverlayVScrollBar.cpp (+5/-7)
To merge this branch: bzr merge lp:~brandontschaefer/unity/allow-outof-bounds-dragging-overlay-scrollbar
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+143429@code.launchpad.net

This proposal has been superseded by a proposal from 2013-04-02.

Description of the change

Nick mentioned that it is very hard to use the scroll bar to drag all the way down. It is very noticeable in the previews for an application. I think it would be better if it would stop scrolling when the scroll bar it self hit the bottom/top not the overlay thumb.

Here is what it looks like in unity right now:
http://ubuntuone.com/1jc4PcPg8dsFH85r0AoO0U

As you can see, it is hard to scroll through the text, as the thumb it self is larger then the scrollbar, so you will have to scroll down, then move up and scroll down....slightly annoying.

**Note** John has approved of this change.

To post a comment you must log in.

Unmerged revisions

3044. By Brandon Schaefer

* Allows for the scrollbar to contiune to scroll down/up if the Overlaythumb is at the track min/max.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/PlacesOverlayVScrollBar.cpp'
2--- unity-shared/PlacesOverlayVScrollBar.cpp 2012-12-13 14:26:56 +0000
3+++ unity-shared/PlacesOverlayVScrollBar.cpp 2013-01-16 01:12:26 +0000
4@@ -85,7 +85,7 @@
5 if (!sensitive)
6 {
7 overlay_window_->ResetStates();
8- ResetConnector();
9+ ResetConnector();
10 }
11 }
12
13@@ -353,17 +353,15 @@
14 MouseDraggingOverlay(y, dy);
15 }
16
17-void PlacesOverlayVScrollBar::MouseDraggingOverlay(int y, int dys)
18+void PlacesOverlayVScrollBar::MouseDraggingOverlay(int y, int dy)
19 {
20- int const dy = y - overlay_window_->GetThumbOffsetY() - mouse_down_offset_;
21- int const at_min = overlay_window_->GetThumbOffsetY() <= 0;
22- int const at_max = overlay_window_->GetThumbOffsetY() + overlay_window_->GetThumbHeight() >= _track->GetBaseHeight();
23+ int const thumb_offset = overlay_window_->GetThumbOffsetY() + mouse_down_offset_;
24
25- if (dy < 0 && !at_min)
26+ if (dy < 0 && !AtMinimum() && y <= thumb_offset)
27 {
28 OnScrollUp.emit(stepY, abs(dy));
29 }
30- else if (dy > 0 && !at_max)
31+ else if (dy > 0 && !AtMaximum() && y >= thumb_offset)
32 {
33 OnScrollDown.emit(stepY, dy);
34 }