Merge lp:~cimi/overlay-scrollbar/proximity-area-update into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Merged at revision: 146
Proposed branch: lp:~cimi/overlay-scrollbar/proximity-area-update
Merge into: lp:overlay-scrollbar
Diff against target: 34 lines (+5/-5)
1 file modified
os/os-scrollbar.c (+5/-5)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/proximity-area-update
Reviewer Review Type Date Requested Status
Loïc Molinari (community) Approve
Review via email: mp+52460@code.launchpad.net

Description of the change

Updates to the position of the proximity area, now the thumb is shown only if you point at the right/top of the pager, not at its left/bottom

To post a comment you must log in.
Revision history for this message
Loïc Molinari (loic.molinari) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'os/os-scrollbar.c'
2--- os/os-scrollbar.c 2011-03-07 17:27:55 +0000
3+++ os/os-scrollbar.c 2011-03-07 19:13:04 +0000
4@@ -36,7 +36,7 @@
5 #define DEFAULT_SCROLLBAR_HEIGHT 80
6
7 /* Width of the proximity effect in pixels. */
8-#define PROXIMITY_WIDTH 40
9+#define PROXIMITY_WIDTH 30
10
11 /* Timeout before hiding in milliseconds. */
12 #define TIMEOUT_HIDE 1000
13@@ -1104,8 +1104,8 @@
14 /* proximity area */
15 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
16 {
17- if ((priv->thumb_all.x - xevent->xmotion.x < PROXIMITY_WIDTH &&
18- priv->thumb_all.x + priv->slider.width - xevent->xmotion.x > 0) &&
19+ if ((priv->thumb_all.x - xevent->xmotion.x <= PROXIMITY_WIDTH &&
20+ priv->thumb_all.x - xevent->xmotion.x >= 0) &&
21 (xevent->xmotion.y >= priv->thumb_all.y + priv->overlay.y &&
22 xevent->xmotion.y <= priv->thumb_all.y + priv->overlay.y + priv->overlay.height))
23 {
24@@ -1140,8 +1140,8 @@
25 }
26 else
27 {
28- if ((priv->thumb_all.y - xevent->xmotion.y < PROXIMITY_WIDTH &&
29- priv->thumb_all.y + priv->slider.height - xevent->xmotion.y > 0) &&
30+ if ((priv->thumb_all.y - xevent->xmotion.y <= PROXIMITY_WIDTH &&
31+ priv->thumb_all.y - xevent->xmotion.y >= 0) &&
32 (xevent->xmotion.x >= priv->thumb_all.x + priv->overlay.x &&
33 xevent->xmotion.x <= priv->thumb_all.x + priv->overlay.x + priv->overlay.width))
34 {

Subscribers

People subscribed via source and target branches