Merge lp:~cimi/overlay-scrollbar/proximity-over-pager into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Approved by: Ted Gould
Approved revision: 252
Merged at revision: 252
Proposed branch: lp:~cimi/overlay-scrollbar/proximity-over-pager
Merge into: lp:overlay-scrollbar
Diff against target: 122 lines (+32/-32)
1 file modified
os/os-scrollbar.c (+32/-32)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/proximity-over-pager
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+64578@code.launchpad.net

Description of the change

The idea is to have proximity also over the pager, that means the thumb will appear immediately when approaching from the right (now, you need to go on the left of the pager, then right again)

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

I was unclear on DEFAULT_PAGER_WIDTH as I thought it was the size of it, but I asked Cimi over IM and he explained that it is more like that spacing for the proximity area from the end of the visible items.

review: Approve
Revision history for this message
Andrea Cimitan (cimi) wrote :

in reality is the width/size in pixels of the pager, but I'll open a new branch with better namings :D

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'os/os-scrollbar.c'
--- os/os-scrollbar.c 2011-06-14 16:37:12 +0000
+++ os/os-scrollbar.c 2011-06-14 17:23:31 +0000
@@ -1619,10 +1619,10 @@
1619 /* proximity area */1619 /* proximity area */
1620 if (priv->orientation == GTK_ORIENTATION_VERTICAL)1620 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
1621 {1621 {
1622 if ((priv->thumb_all.x - xiev->event_x <= PROXIMITY_WIDTH &&1622 if ((priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xiev->event_x <= PROXIMITY_WIDTH &&
1623 priv->thumb_all.x - xiev->event_x >= 0) &&1623 priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xiev->event_x >= 0) &&
1624 (xiev->event_y >= priv->thumb_all.y + priv->overlay.y &&1624 (xiev->event_y >= priv->overlay_all.y + priv->overlay.y &&
1625 xiev->event_y <= priv->thumb_all.y + priv->overlay.y + priv->overlay.height))1625 xiev->event_y <= priv->overlay_all.y + priv->overlay.y + priv->overlay.height))
1626 {1626 {
1627 priv->can_hide = FALSE;1627 priv->can_hide = FALSE;
16281628
@@ -1652,10 +1652,10 @@
1652 }1652 }
1653 else1653 else
1654 {1654 {
1655 if ((priv->thumb_all.y - xiev->event_y <= PROXIMITY_WIDTH &&1655 if ((priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xiev->event_y <= PROXIMITY_WIDTH &&
1656 priv->thumb_all.y - xiev->event_y >= 0) &&1656 priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xiev->event_y >= 0) &&
1657 (xiev->event_x >= priv->thumb_all.x + priv->overlay.x &&1657 (xiev->event_x >= priv->overlay_all.x + priv->overlay.x &&
1658 xiev->event_x <= priv->thumb_all.x + priv->overlay.x + priv->overlay.width))1658 xiev->event_x <= priv->overlay_all.x + priv->overlay.x + priv->overlay.width))
1659 {1659 {
1660 priv->can_hide = FALSE;1660 priv->can_hide = FALSE;
16611661
@@ -1746,10 +1746,10 @@
1746 /* proximity area */1746 /* proximity area */
1747 if (priv->orientation == GTK_ORIENTATION_VERTICAL)1747 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
1748 {1748 {
1749 if ((priv->thumb_all.x - xiev->event_x <= PROXIMITY_WIDTH &&1749 if ((priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xiev->event_x <= PROXIMITY_WIDTH &&
1750 priv->thumb_all.x - xiev->event_x >= 0) &&1750 priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xiev->event_x >= 0) &&
1751 (xiev->event_y >= priv->thumb_all.y + priv->overlay.y &&1751 (xiev->event_y >= priv->overlay_all.y + priv->overlay.y &&
1752 xiev->event_y <= priv->thumb_all.y + priv->overlay.y + priv->overlay.height))1752 xiev->event_y <= priv->overlay_all.y + priv->overlay.y + priv->overlay.height))
1753 {1753 {
1754 priv->can_hide = FALSE;1754 priv->can_hide = FALSE;
17551755
@@ -1787,10 +1787,10 @@
1787 }1787 }
1788 else1788 else
1789 {1789 {
1790 if ((priv->thumb_all.y - xiev->event_y <= PROXIMITY_WIDTH &&1790 if ((priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xiev->event_y <= PROXIMITY_WIDTH &&
1791 priv->thumb_all.y - xiev->event_y >= 0) &&1791 priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xiev->event_y >= 0) &&
1792 (xiev->event_x >= priv->thumb_all.x + priv->overlay.x &&1792 (xiev->event_x >= priv->overlay_all.x + priv->overlay.x &&
1793 xiev->event_x <= priv->thumb_all.x + priv->overlay.x + priv->overlay.width))1793 xiev->event_x <= priv->overlay_all.x + priv->overlay.x + priv->overlay.width))
1794 {1794 {
1795 priv->can_hide = FALSE;1795 priv->can_hide = FALSE;
17961796
@@ -1867,10 +1867,10 @@
1867 /* proximity area */1867 /* proximity area */
1868 if (priv->orientation == GTK_ORIENTATION_VERTICAL)1868 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
1869 {1869 {
1870 if ((priv->thumb_all.x - xev->xbutton.x <= PROXIMITY_WIDTH &&1870 if ((priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xev->xbutton.x <= PROXIMITY_WIDTH &&
1871 priv->thumb_all.x - xev->xbutton.x >= 0) &&1871 priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xev->xbutton.x >= 0) &&
1872 (xev->xbutton.y >= priv->thumb_all.y + priv->overlay.y &&1872 (xev->xbutton.y >= priv->overlay_all.y + priv->overlay.y &&
1873 xev->xbutton.y <= priv->thumb_all.y + priv->overlay.y + priv->overlay.height))1873 xev->xbutton.y <= priv->overlay_all.y + priv->overlay.y + priv->overlay.height))
1874 {1874 {
1875 priv->can_hide = FALSE;1875 priv->can_hide = FALSE;
18761876
@@ -1900,10 +1900,10 @@
1900 }1900 }
1901 else1901 else
1902 {1902 {
1903 if ((priv->thumb_all.y - xev->xbutton.y <= PROXIMITY_WIDTH &&1903 if ((priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xev->xbutton.y <= PROXIMITY_WIDTH &&
1904 priv->thumb_all.y - xev->xbutton.y >= 0) &&1904 priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xev->xbutton.y >= 0) &&
1905 (xev->xbutton.x >= priv->thumb_all.x + priv->overlay.x &&1905 (xev->xbutton.x >= priv->overlay_all.x + priv->overlay.x &&
1906 xev->xbutton.x <= priv->thumb_all.x + priv->overlay.x + priv->overlay.width))1906 xev->xbutton.x <= priv->overlay_all.x + priv->overlay.x + priv->overlay.width))
1907 {1907 {
1908 priv->can_hide = FALSE;1908 priv->can_hide = FALSE;
19091909
@@ -1991,10 +1991,10 @@
1991 /* proximity area */1991 /* proximity area */
1992 if (priv->orientation == GTK_ORIENTATION_VERTICAL)1992 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
1993 {1993 {
1994 if ((priv->thumb_all.x - xev->xmotion.x <= PROXIMITY_WIDTH &&1994 if ((priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xev->xmotion.x <= PROXIMITY_WIDTH &&
1995 priv->thumb_all.x - xev->xmotion.x >= 0) &&1995 priv->overlay_all.x + DEFAULT_PAGER_WIDTH - xev->xmotion.x >= 0) &&
1996 (xev->xmotion.y >= priv->thumb_all.y + priv->overlay.y &&1996 (xev->xmotion.y >= priv->overlay_all.y + priv->overlay.y &&
1997 xev->xmotion.y <= priv->thumb_all.y + priv->overlay.y + priv->overlay.height))1997 xev->xmotion.y <= priv->overlay_all.y + priv->overlay.y + priv->overlay.height))
1998 {1998 {
1999 priv->can_hide = FALSE;1999 priv->can_hide = FALSE;
20002000
@@ -2032,10 +2032,10 @@
2032 }2032 }
2033 else2033 else
2034 {2034 {
2035 if ((priv->thumb_all.y - xev->xmotion.y <= PROXIMITY_WIDTH &&2035 if ((priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xev->xmotion.y <= PROXIMITY_WIDTH &&
2036 priv->thumb_all.y - xev->xmotion.y >= 0) &&2036 priv->overlay_all.y + DEFAULT_PAGER_WIDTH - xev->xmotion.y >= 0) &&
2037 (xev->xmotion.x >= priv->thumb_all.x + priv->overlay.x &&2037 (xev->xmotion.x >= priv->overlay_all.x + priv->overlay.x &&
2038 xev->xmotion.x <= priv->thumb_all.x + priv->overlay.x + priv->overlay.width))2038 xev->xmotion.x <= priv->overlay_all.x + priv->overlay.x + priv->overlay.width))
2039 {2039 {
2040 priv->can_hide = FALSE;2040 priv->can_hide = FALSE;
20412041

Subscribers

People subscribed via source and target branches