[UXTHEME] -Fix drawing the themed scrollbar. CORE-12933
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Mon, 27 Mar 2017 19:56:36 +0000 (19:56 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Mon, 27 Mar 2017 19:56:36 +0000 (19:56 +0000)
svn path=/trunk/; revision=74234

reactos/dll/win32/uxtheme/ncscrollbar.c

index 23554b3..62d6da7 100644 (file)
@@ -182,14 +182,18 @@ static void SCROLL_DrawInterior( PDRAW_CONTEXT pcontext, SCROLLBARINFO* psbi,
 {
     RECT r, rcPart;
 
+    /* thumbPos is relative to the edge of the scrollbar */
+
     r = psbi->rcScrollBar;
     if (vertical)
     {
+        thumbPos += pcontext->wi.rcClient.top - pcontext->wi.rcWindow.top;
         r.top    += psbi->dxyLineButton;
         r.bottom -= (psbi->dxyLineButton);
     }
     else
     {
+        thumbPos += pcontext->wi.rcClient.left - pcontext->wi.rcWindow.left;
         r.left  += psbi->dxyLineButton;
         r.right -= psbi->dxyLineButton;
     }