mirror of
https://github.com/reactos/reactos.git
synced 2024-10-20 08:01:05 +00:00
fixed some drawing bugs of scrollbars
svn path=/trunk/; revision=6143
This commit is contained in:
parent
895c98c856
commit
fbbaa9a97d
|
@ -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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -141,13 +141,17 @@ DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar);
|
||||||
|
|
||||||
psbi->xyThumbTop -= arrowSize;
|
psbi->xyThumbTop -= arrowSize;
|
||||||
|
|
||||||
|
if(psbi->dxyLineButton)
|
||||||
|
{
|
||||||
if (vertical)
|
if (vertical)
|
||||||
|
{
|
||||||
|
if(thumbSize)
|
||||||
{
|
{
|
||||||
PatBlt (hdc,
|
PatBlt (hdc,
|
||||||
rc.left,
|
rc.left,
|
||||||
rc.top,
|
rc.top,
|
||||||
rc.right - rc.left,
|
rc.right - rc.left,
|
||||||
psbi->dxyLineButton,
|
psbi->xyThumbTop,
|
||||||
top_selected ? 0x0f0000 : PATCOPY);
|
top_selected ? 0x0f0000 : PATCOPY);
|
||||||
rc.top += psbi->xyThumbTop;
|
rc.top += psbi->xyThumbTop;
|
||||||
PatBlt (hdc,
|
PatBlt (hdc,
|
||||||
|
@ -159,6 +163,19 @@ DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar);
|
||||||
rc.bottom = rc.top + thumbSize;
|
rc.bottom = rc.top + thumbSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(psbi->xyThumbTop)
|
||||||
|
PatBlt (hdc,
|
||||||
|
rc.left,
|
||||||
|
psbi->dxyLineButton,
|
||||||
|
rc.right - rc.left,
|
||||||
|
rc.bottom - rc.bottom,
|
||||||
|
PATCOPY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(thumbSize)
|
||||||
{
|
{
|
||||||
PatBlt (hdc,
|
PatBlt (hdc,
|
||||||
rc.left,
|
rc.left,
|
||||||
|
@ -175,8 +192,21 @@ DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar);
|
||||||
bottom_selected ? 0x0f0000 : PATCOPY);
|
bottom_selected ? 0x0f0000 : PATCOPY);
|
||||||
rc.right = rc.left + thumbSize;
|
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 */
|
/* Draw the thumb */
|
||||||
|
if(thumbSize)
|
||||||
DrawEdge (hdc, &rc, EDGE_RAISED, BF_RECT | BF_MIDDLE);
|
DrawEdge (hdc, &rc, EDGE_RAISED, BF_RECT | BF_MIDDLE);
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
|
@ -281,10 +311,7 @@ SCROLL_DrawScrollBar (HWND hwnd, HDC hdc, INT nBar,
|
||||||
|
|
||||||
thumbSize = info.xyThumbBottom - info.xyThumbTop;
|
thumbSize = info.xyThumbBottom - info.xyThumbTop;
|
||||||
|
|
||||||
if (vertical)
|
arrowSize = info.dxyLineButton;
|
||||||
arrowSize = GetSystemMetrics(SM_CXVSCROLL);
|
|
||||||
else
|
|
||||||
arrowSize = GetSystemMetrics(SM_CYHSCROLL);
|
|
||||||
|
|
||||||
if (IsRectEmpty (&(info.rcScrollBar))) goto END;
|
if (IsRectEmpty (&(info.rcScrollBar))) goto END;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue