mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 14:59:47 +03:00
[project @ 2006-02-11 03:40:26 by adrianl]
Auto-repeat for scrollbar buttons svn path=/import/netsurf/; revision=2070
This commit is contained in:
parent
e7810f25bf
commit
6b3b19a95b
@ -1255,6 +1255,10 @@ const char *browser_window_scrollbar_click(struct browser_window *bw,
|
||||
browser_mouse_state mouse, struct box *box,
|
||||
int box_x, int box_y, int x, int y)
|
||||
{
|
||||
const browser_mouse_state but1 = (BROWSER_MOUSE_CLICK_1 |
|
||||
BROWSER_MOUSE_DRAG_1 | BROWSER_MOUSE_HOLDING_1);
|
||||
const browser_mouse_state but2 = (BROWSER_MOUSE_CLICK_2 |
|
||||
BROWSER_MOUSE_DRAG_2 | BROWSER_MOUSE_HOLDING_2);
|
||||
const int w = SCROLLBAR_WIDTH;
|
||||
bool vscroll, hscroll;
|
||||
int well_height, bar_top, bar_height;
|
||||
@ -1303,9 +1307,9 @@ const char *browser_window_scrollbar_click(struct browser_window *bw,
|
||||
/* find icon in scrollbar and calculate scroll */
|
||||
if (z < w) {
|
||||
status = messages_get(vert ? "ScrollUp" : "ScrollLeft");
|
||||
if (mouse & BROWSER_MOUSE_CLICK_1)
|
||||
if (mouse & but1)
|
||||
scroll -= 16;
|
||||
else if (mouse & BROWSER_MOUSE_CLICK_2)
|
||||
else if (mouse & but2)
|
||||
scroll += 16;
|
||||
} else if (z < w + bar_start + w / 4) {
|
||||
status = messages_get(vert ? "ScrollPUp" : "ScrollPLeft");
|
||||
@ -1349,9 +1353,9 @@ const char *browser_window_scrollbar_click(struct browser_window *bw,
|
||||
scroll -= page;
|
||||
} else {
|
||||
status = messages_get(vert ? "ScrollDown" : "ScrollRight");
|
||||
if (mouse & BROWSER_MOUSE_CLICK_1)
|
||||
if (mouse & but1)
|
||||
scroll += 16;
|
||||
else if (mouse & BROWSER_MOUSE_CLICK_2)
|
||||
else if (mouse & but2)
|
||||
scroll -= 16;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user