Merge lp:~cimi/overlay-scrollbar/hide-thumb-no-timeout into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Merged at revision: 189
Proposed branch: lp:~cimi/overlay-scrollbar/hide-thumb-no-timeout
Merge into: lp:overlay-scrollbar
Diff against target: 41 lines (+9/-6)
1 file modified
os/os-scrollbar.c (+9/-6)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/hide-thumb-no-timeout
Reviewer Review Type Date Requested Status
Loïc Molinari (community) Approve
Review via email: mp+56195@code.launchpad.net

Description of the change

Use two different timeouts

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
=== modified file 'os/os-scrollbar.c'
--- os/os-scrollbar.c 2011-04-01 17:22:12 +0000
+++ os/os-scrollbar.c 2011-04-04 16:08:24 +0000
@@ -34,8 +34,11 @@
34/* Width of the proximity effect in pixels. */34/* Width of the proximity effect in pixels. */
35#define PROXIMITY_WIDTH 3035#define PROXIMITY_WIDTH 30
3636
37/* Timeout before hiding in milliseconds. */37/* Timeout before hiding in ms, after leaving the thumb. */
38#define TIMEOUT_HIDE 100038#define TIMEOUT_THUMB_HIDE 1000
39
40/* Timeout before hiding in ms, after leaving the toplevel. */
41#define TIMEOUT_TOPLEVEL_HIDE 200
3942
40struct _OsScrollbarPrivate43struct _OsScrollbarPrivate
41{44{
@@ -728,9 +731,9 @@
728 priv->can_hide = TRUE;731 priv->can_hide = TRUE;
729 }732 }
730733
731 g_timeout_add (TIMEOUT_HIDE, os_scrollbar_deactivate_pager_cb,734 g_timeout_add (TIMEOUT_THUMB_HIDE, os_scrollbar_deactivate_pager_cb,
732 g_object_ref (scrollbar));735 g_object_ref (scrollbar));
733 g_timeout_add (TIMEOUT_HIDE, os_scrollbar_hide_thumb_cb,736 g_timeout_add (TIMEOUT_THUMB_HIDE, os_scrollbar_hide_thumb_cb,
734 g_object_ref (scrollbar));737 g_object_ref (scrollbar));
735738
736 return FALSE;739 return FALSE;
@@ -1181,9 +1184,9 @@
1181 priv->can_deactivate_pager = TRUE;1184 priv->can_deactivate_pager = TRUE;
1182 priv->can_hide = TRUE;1185 priv->can_hide = TRUE;
11831186
1184 g_timeout_add (TIMEOUT_HIDE, os_scrollbar_deactivate_pager_cb,1187 g_timeout_add (TIMEOUT_TOPLEVEL_HIDE, os_scrollbar_deactivate_pager_cb,
1185 g_object_ref (scrollbar));1188 g_object_ref (scrollbar));
1186 g_timeout_add (TIMEOUT_HIDE, os_scrollbar_hide_thumb_cb,1189 g_timeout_add (TIMEOUT_TOPLEVEL_HIDE, os_scrollbar_hide_thumb_cb,
1187 g_object_ref (scrollbar));1190 g_object_ref (scrollbar));
11881191
1189 return FALSE;1192 return FALSE;

Subscribers

People subscribed via source and target branches