summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_monthcalendar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/cfwl_monthcalendar.cpp')
-rw-r--r--xfa/fwl/cfwl_monthcalendar.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 2dcac03731..6d6066370d 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -415,8 +415,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
CFWL_ThemePart params;
params.m_pWidget = this;
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
- FX_FLOAT fMaxWeekW = 0.0f;
- FX_FLOAT fMaxWeekH = 0.0f;
+ float fMaxWeekW = 0.0f;
+ float fMaxWeekH = 0.0f;
for (uint32_t i = 0; i < 7; ++i) {
CFX_SizeF sz = CalcTextSize(GetCapacityForDay(pTheme, params, i),
@@ -425,8 +425,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
fMaxWeekH = (fMaxWeekH >= sz.height) ? fMaxWeekH : sz.height;
}
- FX_FLOAT fDayMaxW = 0.0f;
- FX_FLOAT fDayMaxH = 0.0f;
+ float fDayMaxW = 0.0f;
+ float fDayMaxH = 0.0f;
for (int day = 10; day <= 31; day++) {
CFX_WideString wsDay;
wsDay.Format(L"%d", day);
@@ -434,16 +434,16 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
fDayMaxW = (fDayMaxW >= sz.width) ? fDayMaxW : sz.width;
fDayMaxH = (fDayMaxH >= sz.height) ? fDayMaxH : sz.height;
}
- m_szCell.width = FX_FLOAT((fMaxWeekW >= fDayMaxW) ? (int)(fMaxWeekW + 0.5)
- : (int)(fDayMaxW + 0.5));
+ m_szCell.width = float((fMaxWeekW >= fDayMaxW) ? (int)(fMaxWeekW + 0.5)
+ : (int)(fDayMaxW + 0.5));
m_szCell.height = (fMaxWeekH >= fDayMaxH) ? fMaxWeekH : fDayMaxH;
CFX_SizeF fs;
fs.width = m_szCell.width * MONTHCAL_COLUMNS +
MONTHCAL_HMARGIN * MONTHCAL_COLUMNS * 2 +
MONTHCAL_HEADER_BTN_HMARGIN * 2;
- FX_FLOAT fMonthMaxW = 0.0f;
- FX_FLOAT fMonthMaxH = 0.0f;
+ float fMonthMaxW = 0.0f;
+ float fMonthMaxH = 0.0f;
for (uint32_t i = 0; i < 12; ++i) {
CFX_SizeF sz = CalcTextSize(GetCapacityForMonth(pTheme, params, i),
@@ -472,8 +472,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
}
void CFWL_MonthCalendar::CalcHeadSize() {
- FX_FLOAT fHeadHMargin = (m_rtClient.width - m_szHead.width) / 2;
- FX_FLOAT fHeadVMargin = (m_szCell.width - m_szHead.height) / 2;
+ float fHeadHMargin = (m_rtClient.width - m_szHead.width) / 2;
+ float fHeadVMargin = (m_szCell.width - m_szHead.height) / 2;
m_rtHeadText = CFX_RectF(m_rtClient.left + fHeadHMargin,
m_rtClient.top + MONTHCAL_HEADER_BTN_VMARGIN +
MONTHCAL_VMARGIN + fHeadVMargin,
@@ -527,8 +527,8 @@ void CFWL_MonthCalendar::Layout() {
void CFWL_MonthCalendar::CalDateItem() {
bool bNewWeek = false;
int32_t iWeekOfMonth = 0;
- FX_FLOAT fLeft = m_rtDates.left;
- FX_FLOAT fTop = m_rtDates.top;
+ float fLeft = m_rtDates.left;
+ float fTop = m_rtDates.top;
for (const auto& pDateInfo : m_arrDates) {
if (bNewWeek) {
iWeekOfMonth++;