summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_monthcalendartp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/theme/cfwl_monthcalendartp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_monthcalendartp.cpp44
1 files changed, 30 insertions, 14 deletions
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index 476135fa44..cf6306a53f 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -106,9 +106,11 @@ void CFWL_MonthCalendarTP::DrawTotalBK(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
+
CFX_RectF rtTotal(pParams->m_rtPart);
path.AddRectangle(rtTotal.left, rtTotal.top, rtTotal.width, rtTotal.height);
pParams->m_pGraphics->SaveGraphState();
+
CFX_Color clrBK(m_pThemeData->clrBK);
pParams->m_pGraphics->SetFillColor(&clrBK);
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
@@ -119,9 +121,11 @@ void CFWL_MonthCalendarTP::DrawHeadBk(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
+
CFX_RectF rtHead = pParams->m_rtPart;
path.AddRectangle(rtHead.left, rtHead.top, rtHead.width, rtHead.height);
pParams->m_pGraphics->SaveGraphState();
+
CFX_Color clrHeadBK(m_pThemeData->clrBK);
pParams->m_pGraphics->SetFillColor(&clrHeadBK);
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
@@ -132,9 +136,11 @@ void CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
+
CFX_RectF rtLBtn = pParams->m_rtPart;
path.AddRectangle(rtLBtn.left, rtLBtn.top, rtLBtn.width, rtLBtn.height);
pParams->m_pGraphics->SaveGraphState();
+
CFX_Color clrLBtnEdge(ArgbEncode(0xff, 205, 219, 243));
pParams->m_pGraphics->SetStrokeColor(&clrLBtnEdge);
pParams->m_pGraphics->StrokePath(&path, pMatrix);
@@ -147,12 +153,15 @@ void CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams,
pParams->m_pGraphics->SetFillColor(&clrLBtnFill);
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}
+
path.Clear();
- path.MoveTo(rtLBtn.left + rtLBtn.Width() / 3 * 2,
- rtLBtn.top + rtLBtn.height / 4);
- path.LineTo(rtLBtn.left + rtLBtn.Width() / 3, rtLBtn.top + rtLBtn.height / 2);
- path.LineTo(rtLBtn.left + rtLBtn.Width() / 3 * 2,
- rtLBtn.bottom() - rtLBtn.height / 4);
+ path.MoveTo(CFX_PointF(rtLBtn.left + rtLBtn.Width() / 3 * 2,
+ rtLBtn.top + rtLBtn.height / 4));
+ path.LineTo(CFX_PointF(rtLBtn.left + rtLBtn.Width() / 3,
+ rtLBtn.top + rtLBtn.height / 2));
+ path.LineTo(CFX_PointF(rtLBtn.left + rtLBtn.Width() / 3 * 2,
+ rtLBtn.bottom() - rtLBtn.height / 4));
+
CFX_Color clrFlag(ArgbEncode(0xff, 50, 104, 205));
pParams->m_pGraphics->SetStrokeColor(&clrFlag);
pParams->m_pGraphics->StrokePath(&path, pMatrix);
@@ -163,9 +172,11 @@ void CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
+
CFX_RectF rtRBtn = pParams->m_rtPart;
path.AddRectangle(rtRBtn.left, rtRBtn.top, rtRBtn.width, rtRBtn.height);
pParams->m_pGraphics->SaveGraphState();
+
CFX_Color clrRBtnEdge(ArgbEncode(0xff, 205, 219, 243));
pParams->m_pGraphics->SetStrokeColor(&clrRBtnEdge);
pParams->m_pGraphics->StrokePath(&path, pMatrix);
@@ -178,12 +189,15 @@ void CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams,
pParams->m_pGraphics->SetFillColor(&clrRBtnFill);
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
}
+
path.Clear();
- path.MoveTo(rtRBtn.left + rtRBtn.Width() / 3, rtRBtn.top + rtRBtn.height / 4);
- path.LineTo(rtRBtn.left + rtRBtn.Width() / 3 * 2,
- rtRBtn.top + rtRBtn.height / 2);
- path.LineTo(rtRBtn.left + rtRBtn.Width() / 3,
- rtRBtn.bottom() - rtRBtn.height / 4);
+ path.MoveTo(CFX_PointF(rtRBtn.left + rtRBtn.Width() / 3,
+ rtRBtn.top + rtRBtn.height / 4));
+ path.LineTo(CFX_PointF(rtRBtn.left + rtRBtn.Width() / 3 * 2,
+ rtRBtn.top + rtRBtn.height / 2));
+ path.LineTo(CFX_PointF(rtRBtn.left + rtRBtn.Width() / 3,
+ rtRBtn.bottom() - rtRBtn.height / 4));
+
CFX_Color clrFlag(ArgbEncode(0xff, 50, 104, 205));
pParams->m_pGraphics->SetStrokeColor(&clrFlag);
pParams->m_pGraphics->StrokePath(&path, pMatrix);
@@ -195,9 +209,10 @@ void CFWL_MonthCalendarTP::DrawHSeperator(CFWL_ThemeBackground* pParams,
CFX_Path path;
path.Create();
CFX_RectF rtHSep = pParams->m_rtPart;
- path.MoveTo(rtHSep.left, rtHSep.top + rtHSep.height / 2);
- path.LineTo(rtHSep.right(), rtHSep.top + rtHSep.height / 2);
+ path.MoveTo(CFX_PointF(rtHSep.left, rtHSep.top + rtHSep.height / 2));
+ path.LineTo(CFX_PointF(rtHSep.right(), rtHSep.top + rtHSep.height / 2));
pParams->m_pGraphics->SaveGraphState();
+
CFX_Color clrHSep(m_pThemeData->clrSeperator);
pParams->m_pGraphics->SetStrokeColor(&clrHSep);
pParams->m_pGraphics->StrokePath(&path, pMatrix);
@@ -209,9 +224,10 @@ void CFWL_MonthCalendarTP::DrawWeekNumSep(CFWL_ThemeBackground* pParams,
CFX_Path path;
path.Create();
CFX_RectF rtWeekSep = pParams->m_rtPart;
- path.MoveTo(rtWeekSep.left, rtWeekSep.top);
- path.LineTo(rtWeekSep.left, rtWeekSep.bottom());
+ path.MoveTo(rtWeekSep.TopLeft());
+ path.LineTo(rtWeekSep.BottomLeft());
pParams->m_pGraphics->SaveGraphState();
+
CFX_Color clrHSep(m_pThemeData->clrSeperator);
pParams->m_pGraphics->SetStrokeColor(&clrHSep);
pParams->m_pGraphics->StrokePath(&path, pMatrix);