diff options
Diffstat (limited to 'xfa/fwl/theme/cfwl_scrollbartp.cpp')
-rw-r--r-- | xfa/fwl/theme/cfwl_scrollbartp.cpp | 72 |
1 files changed, 40 insertions, 32 deletions
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp index 4cd2fb376d..5f8f7dcd49 100644 --- a/xfa/fwl/theme/cfwl_scrollbartp.cpp +++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp @@ -130,30 +130,34 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics, if (pRect->width / 2 <= fPawLen) { fPawLen = (pRect->width - 6) / 2; } + FX_FLOAT fX = pRect->left + pRect->width / 4; FX_FLOAT fY = pRect->top + pRect->height / 2; - path.MoveTo(fX, fY - 4); - path.LineTo(fX + fPawLen, fY - 4); - path.MoveTo(fX, fY - 2); - path.LineTo(fX + fPawLen, fY - 2); - path.MoveTo(fX, fY); - path.LineTo(fX + fPawLen, fY); - path.MoveTo(fX, fY + 2); - path.LineTo(fX + fPawLen, fY + 2); + path.MoveTo(CFX_PointF(fX, fY - 4)); + path.LineTo(CFX_PointF(fX + fPawLen, fY - 4)); + path.MoveTo(CFX_PointF(fX, fY - 2)); + path.LineTo(CFX_PointF(fX + fPawLen, fY - 2)); + path.MoveTo(CFX_PointF(fX, fY)); + path.LineTo(CFX_PointF(fX + fPawLen, fY)); + path.MoveTo(CFX_PointF(fX, fY + 2)); + path.LineTo(CFX_PointF(fX + fPawLen, fY + 2)); + CFX_Color clrLight(m_pThemeData->clrPawColorLight[eState - 1]); pGraphics->SetLineWidth(1); pGraphics->SetStrokeColor(&clrLight); pGraphics->StrokePath(&path); fX++; + path.Clear(); - path.MoveTo(fX, fY - 3); - path.LineTo(fX + fPawLen, fY - 3); - path.MoveTo(fX, fY - 1); - path.LineTo(fX + fPawLen, fY - 1); - path.MoveTo(fX, fY + 1); - path.LineTo(fX + fPawLen, fY + 1); - path.MoveTo(fX, fY + 3); - path.LineTo(fX + fPawLen, fY + 3); + path.MoveTo(CFX_PointF(fX, fY - 3)); + path.LineTo(CFX_PointF(fX + fPawLen, fY - 3)); + path.MoveTo(CFX_PointF(fX, fY - 1)); + path.LineTo(CFX_PointF(fX + fPawLen, fY - 1)); + path.MoveTo(CFX_PointF(fX, fY + 1)); + path.LineTo(CFX_PointF(fX + fPawLen, fY + 1)); + path.MoveTo(CFX_PointF(fX, fY + 3)); + path.LineTo(CFX_PointF(fX + fPawLen, fY + 3)); + CFX_Color clrDark(m_pThemeData->clrPawColorDark[eState - 1]); pGraphics->SetLineWidth(1); pGraphics->SetStrokeColor(&clrDark); @@ -163,30 +167,34 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics, if (pRect->height / 2 <= fPawLen) { fPawLen = (pRect->height - 6) / 2; } + FX_FLOAT fX = pRect->left + pRect->width / 2; FX_FLOAT fY = pRect->top + pRect->height / 4; - path.MoveTo(fX - 4, fY); - path.LineTo(fX - 4, fY + fPawLen); - path.MoveTo(fX - 2, fY); - path.LineTo(fX - 2, fY + fPawLen); - path.MoveTo(fX, fY); - path.LineTo(fX, fY + fPawLen); - path.MoveTo(fX + 2, fY); - path.LineTo(fX + 2, fY + fPawLen); + path.MoveTo(CFX_PointF(fX - 4, fY)); + path.LineTo(CFX_PointF(fX - 4, fY + fPawLen)); + path.MoveTo(CFX_PointF(fX - 2, fY)); + path.LineTo(CFX_PointF(fX - 2, fY + fPawLen)); + path.MoveTo(CFX_PointF(fX, fY)); + path.LineTo(CFX_PointF(fX, fY + fPawLen)); + path.MoveTo(CFX_PointF(fX + 2, fY)); + path.LineTo(CFX_PointF(fX + 2, fY + fPawLen)); + CFX_Color clrLight(m_pThemeData->clrPawColorLight[eState - 1]); pGraphics->SetLineWidth(1); pGraphics->SetStrokeColor(&clrLight); pGraphics->StrokePath(&path, pMatrix); fY++; + path.Clear(); - path.MoveTo(fX - 3, fY); - path.LineTo(fX - 3, fY + fPawLen); - path.MoveTo(fX - 1, fY); - path.LineTo(fX - 1, fY + fPawLen); - path.MoveTo(fX + 1, fY); - path.LineTo(fX + 1, fY + fPawLen); - path.MoveTo(fX + 3, fY); - path.LineTo(fX + 3, fY + fPawLen); + path.MoveTo(CFX_PointF(fX - 3, fY)); + path.LineTo(CFX_PointF(fX - 3, fY + fPawLen)); + path.MoveTo(CFX_PointF(fX - 1, fY)); + path.LineTo(CFX_PointF(fX - 1, fY + fPawLen)); + path.MoveTo(CFX_PointF(fX + 1, fY)); + path.LineTo(CFX_PointF(fX + 1, fY + fPawLen)); + path.MoveTo(CFX_PointF(fX + 3, fY)); + path.LineTo(CFX_PointF(fX + 3, fY + fPawLen)); + CFX_Color clrDark(m_pThemeData->clrPawColorDark[eState - 1]); pGraphics->SetLineWidth(1); pGraphics->SetStrokeColor(&clrDark); |