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
1=== modified file 'os/os-scrollbar.c'
2--- os/os-scrollbar.c 2011-04-01 17:22:12 +0000
3+++ os/os-scrollbar.c 2011-04-04 16:08:24 +0000
4@@ -34,8 +34,11 @@
5 /* Width of the proximity effect in pixels. */
6 #define PROXIMITY_WIDTH 30
7
8-/* Timeout before hiding in milliseconds. */
9-#define TIMEOUT_HIDE 1000
10+/* Timeout before hiding in ms, after leaving the thumb. */
11+#define TIMEOUT_THUMB_HIDE 1000
12+
13+/* Timeout before hiding in ms, after leaving the toplevel. */
14+#define TIMEOUT_TOPLEVEL_HIDE 200
15
16 struct _OsScrollbarPrivate
17 {
18@@ -728,9 +731,9 @@
19 priv->can_hide = TRUE;
20 }
21
22- g_timeout_add (TIMEOUT_HIDE, os_scrollbar_deactivate_pager_cb,
23+ g_timeout_add (TIMEOUT_THUMB_HIDE, os_scrollbar_deactivate_pager_cb,
24 g_object_ref (scrollbar));
25- g_timeout_add (TIMEOUT_HIDE, os_scrollbar_hide_thumb_cb,
26+ g_timeout_add (TIMEOUT_THUMB_HIDE, os_scrollbar_hide_thumb_cb,
27 g_object_ref (scrollbar));
28
29 return FALSE;
30@@ -1181,9 +1184,9 @@
31 priv->can_deactivate_pager = TRUE;
32 priv->can_hide = TRUE;
33
34- g_timeout_add (TIMEOUT_HIDE, os_scrollbar_deactivate_pager_cb,
35+ g_timeout_add (TIMEOUT_TOPLEVEL_HIDE, os_scrollbar_deactivate_pager_cb,
36 g_object_ref (scrollbar));
37- g_timeout_add (TIMEOUT_HIDE, os_scrollbar_hide_thumb_cb,
38+ g_timeout_add (TIMEOUT_TOPLEVEL_HIDE, os_scrollbar_hide_thumb_cb,
39 g_object_ref (scrollbar));
40
41 return FALSE;

Subscribers

People subscribed via source and target branches