mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
fixed some drawing bugs of scrollbars
svn path=/trunk/; revision=6143
This commit is contained in:
parent
895c98c856
commit
fbbaa9a97d
1 changed files with 65 additions and 38 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: scrollbar.c,v 1.17 2003/09/24 13:41:40 weiden Exp $
|
||||
/* $Id: scrollbar.c,v 1.18 2003/09/25 21:16:56 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -141,13 +141,17 @@ DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar);
|
|||
|
||||
psbi->xyThumbTop -= arrowSize;
|
||||
|
||||
if(psbi->dxyLineButton)
|
||||
{
|
||||
if (vertical)
|
||||
{
|
||||
if(thumbSize)
|
||||
{
|
||||
PatBlt (hdc,
|
||||
rc.left,
|
||||
rc.top,
|
||||
rc.right - rc.left,
|
||||
psbi->dxyLineButton,
|
||||
psbi->xyThumbTop,
|
||||
top_selected ? 0x0f0000 : PATCOPY);
|
||||
rc.top += psbi->xyThumbTop;
|
||||
PatBlt (hdc,
|
||||
|
@ -159,6 +163,19 @@ DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar);
|
|||
rc.bottom = rc.top + thumbSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(psbi->xyThumbTop)
|
||||
PatBlt (hdc,
|
||||
rc.left,
|
||||
psbi->dxyLineButton,
|
||||
rc.right - rc.left,
|
||||
rc.bottom - rc.bottom,
|
||||
PATCOPY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(thumbSize)
|
||||
{
|
||||
PatBlt (hdc,
|
||||
rc.left,
|
||||
|
@ -175,8 +192,21 @@ DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar);
|
|||
bottom_selected ? 0x0f0000 : PATCOPY);
|
||||
rc.right = rc.left + thumbSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(psbi->xyThumbTop)
|
||||
PatBlt (hdc,
|
||||
psbi->dxyLineButton,
|
||||
rc.top,
|
||||
rc.right - rc.left,
|
||||
rc.bottom - rc.top,
|
||||
PATCOPY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw the thumb */
|
||||
if(thumbSize)
|
||||
DrawEdge (hdc, &rc, EDGE_RAISED, BF_RECT | BF_MIDDLE);
|
||||
|
||||
/* cleanup */
|
||||
|
@ -281,10 +311,7 @@ SCROLL_DrawScrollBar (HWND hwnd, HDC hdc, INT nBar,
|
|||
|
||||
thumbSize = info.xyThumbBottom - info.xyThumbTop;
|
||||
|
||||
if (vertical)
|
||||
arrowSize = GetSystemMetrics(SM_CXVSCROLL);
|
||||
else
|
||||
arrowSize = GetSystemMetrics(SM_CYHSCROLL);
|
||||
arrowSize = info.dxyLineButton;
|
||||
|
||||
if (IsRectEmpty (&(info.rcScrollBar))) goto END;
|
||||
|
||||
|
|
Loading…
Reference in a new issue