It's 8 pixels on XP and Win 7. On Win 10, it's the same size as themed scroll bar thumb.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Pack all scroll bar tracking information in a struct and pass that struct as a parameter to
SCROLL_DrawScrollBar() instead of using global variables.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
So that SCROLL_DrawScrollBar() can eventually be hooked by a themed scroll bar drawing function and
use a single function to draw scroll bars, instead of hooking multiple scroll bar drawing functions
that draw different parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Having a SCROLL_DrawNCScrollBar() in scroll.c enables it to access global variables there. So that
global variables access in SCROLL_DrawScrollBar() can be moved outside of it and
SCROLL_DrawScrollBar() can then be refactored into a function without access to global variables.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
SCROLL_MovingThumb is a global variable. Gradually move it out of scroll bar drawing functions so
that those drawing functions can be refactored in a way that doesn't need access to global variables.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
SCROLL_DrawInterior_9x() has the same functionality as SCROLL_DrawInterior().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
These drawing operations are either overwritten by other drawing functions later or not needed at all.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Non-client scrollbars (SB_HORZ and SB_VERT) don't have their client origin at
(0,0) because they can have non-client borders. It is necessary to offset
by this origin just as it is done for LBUTTONDOWN.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
SetScrollPos may be called on non-scroll window and we should send
SBM_SETSCROLLINFO. This fixes scrollbars in Visio.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
When dragging the scrollbar thumb with the mouse, the mouse is able to
move away from the scrollbar and keep scrolling so long as it isn't too
far away from the scrollbar. This makes it easier to quickly scroll
with the mouse.
All that this patch changes is the distance that the mouse can be moved
away from the scrollbar before it is consider outside of the scrollbar
and returns to its original position. The distances are proportional to
the size of the scrollbar.