From 8439d941eb94fc43c0a0401c3c1b49b0298548b4 Mon Sep 17 00:00:00 2001 From: Syed Khaja Moinuddin Date: Sat, 16 Mar 2013 17:53:05 +0900 Subject: [PATCH] Float related changes. Signed-off-by: Syed Khaja Moinuddin Change-Id: I68881cf76208cc1aecd700bd90c790231acba8b8 Signed-off-by: Syed Khaja Moinuddin --- src/ui/controls/FUiCtrl_Animation.cpp | 4 +- src/ui/controls/FUiCtrl_ColorPicker.cpp | 10 +- src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp | 4 +- src/ui/controls/FUiCtrl_DateTimePicker.cpp | 16 ++- src/ui/controls/FUiCtrl_EditDate.cpp | 14 +-- src/ui/controls/FUiCtrl_EditDatePresenter.cpp | 2 +- src/ui/controls/FUiCtrl_EditTime.cpp | 14 +-- src/ui/controls/FUiCtrl_EditTimePresenter.cpp | 70 +++++------- src/ui/controls/FUiCtrl_Progress.cpp | 6 +- src/ui/controls/FUiCtrl_Slider.cpp | 8 +- src/ui/controls/FUiCtrl_SliderPresenter.cpp | 4 +- src/ui/controls/FUiCtrl_TokenEditPresenter.cpp | 133 +++++++++++------------ src/ui/inc/FUiCtrl_DateTimePicker.h | 2 +- src/ui/inc/FUiCtrl_EditDate.h | 2 +- src/ui/inc/FUiCtrl_EditDatePresenter.h | 2 +- src/ui/inc/FUiCtrl_EditTime.h | 2 +- src/ui/inc/FUiCtrl_EditTimePresenter.h | 10 +- src/ui/inc/FUiCtrl_Slider.h | 2 +- src/ui/inc/FUiCtrl_SliderPresenter.h | 4 +- 19 files changed, 143 insertions(+), 166 deletions(-) diff --git a/src/ui/controls/FUiCtrl_Animation.cpp b/src/ui/controls/FUiCtrl_Animation.cpp index dc4eb55..a63039b 100644 --- a/src/ui/controls/FUiCtrl_Animation.cpp +++ b/src/ui/controls/FUiCtrl_Animation.cpp @@ -146,7 +146,7 @@ _Animation::OnAttachedToMainTree(void) __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); if (__pAccessibilityElement) { - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height)); __pAccessibilityElement->SetName(L"Animation"); __pAccessibilityElement->SetTrait(L"Animation"); pContainer->AddElement(*__pAccessibilityElement); @@ -167,7 +167,7 @@ _Animation::OnBoundsChanged(void) if (__pAccessibilityElement) { - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height)); } return; diff --git a/src/ui/controls/FUiCtrl_ColorPicker.cpp b/src/ui/controls/FUiCtrl_ColorPicker.cpp index 5f765cb..10dbd9e 100644 --- a/src/ui/controls/FUiCtrl_ColorPicker.cpp +++ b/src/ui/controls/FUiCtrl_ColorPicker.cpp @@ -364,11 +364,9 @@ _ColorPicker::InitializeAccessibilityElement(void) _AccessibilityContainer* pContainer = GetAccessibilityContainer(); _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); FloatRectangle floatBounds = GetClientBoundsF(); - int blockHeight = 0; + float blockHeight = 0.0f; GET_SHAPE_CONFIG(COLORPICKER::BLOCK_HEIGHT, orientation, blockHeight); - Rectangle bounds = _CoordinateSystemUtils::ConvertToInteger(floatBounds); - bounds.height = blockHeight; if (pContainer != null) { @@ -380,7 +378,7 @@ _ColorPicker::InitializeAccessibilityElement(void) __pHueBarElement->SetLabel("Hue Slider"); __pHueBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pHueBarElement->SetHint(hintText); - __pHueBarElement->SetBounds(bounds); + __pHueBarElement->SetBounds(floatBounds); pContainer->AddElement(*__pHueBarElement); String hueValue; @@ -393,7 +391,7 @@ _ColorPicker::InitializeAccessibilityElement(void) __pSaturationBarElement->SetLabel("Saturation Slider"); __pSaturationBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pSaturationBarElement->SetHint(hintText); - __pSaturationBarElement->SetBounds(Rectangle(bounds.x, bounds.y + blockHeight, bounds.width, blockHeight)); + __pSaturationBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + blockHeight, floatBounds.width, blockHeight)); pContainer->AddElement(*__pSaturationBarElement); String saturationValue; @@ -406,7 +404,7 @@ _ColorPicker::InitializeAccessibilityElement(void) __pLuminanceBarElement->SetLabel("Luminance Slider"); __pLuminanceBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pLuminanceBarElement->SetHint(hintText); - __pLuminanceBarElement->SetBounds(Rectangle(bounds.x, bounds.y + 2 * blockHeight, bounds.width, blockHeight)); + __pLuminanceBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + 2 * blockHeight, floatBounds.width, blockHeight)); pContainer->AddElement(*__pLuminanceBarElement); String luminanceValue; diff --git a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp index 9a8c458..6d56798 100644 --- a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp @@ -281,7 +281,7 @@ _DateTimeBarPresenter::DrawItem(Canvas& canvas) itemStatus = pDrawItem->GetStatus(); - int fontSize = GetFontSize(); + float fontSize = GetFontSize(); TextSimple* pSimpleText = null; TextObject* pTextObject = new (std::nothrow) TextObject; @@ -527,7 +527,7 @@ _DateTimeBarPresenter::GetItemWidth(void) const FloatDimension textArea; - int fontSize = 0; + float fontSize = 0; GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_FONT_SIZE, __pDateTimeBar->GetOrientation(), fontSize); SysAssertf(__pFont != null, "Font instance is null"); diff --git a/src/ui/controls/FUiCtrl_DateTimePicker.cpp b/src/ui/controls/FUiCtrl_DateTimePicker.cpp index 174b49d..752e406 100644 --- a/src/ui/controls/FUiCtrl_DateTimePicker.cpp +++ b/src/ui/controls/FUiCtrl_DateTimePicker.cpp @@ -256,7 +256,6 @@ _DateTimePicker::CreateFooter(void) result r = E_SUCCESS; _Button* pSaveButton = null; _Button* pCancelButton = null; - Rectangle intBounds; FloatRectangle bounds; String text; _ControlOrientation orientation = GetOrientation(); @@ -268,10 +267,9 @@ _DateTimePicker::CreateFooter(void) r = AttachSystemChild(*pFooter); SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); - GET_SHAPE_CONFIG(DATETIMEPICKER::FOOTER_HEIGHT, orientation, intBounds.height); - GET_SHAPE_CONFIG(DATETIMEPICKER::INPUTPAD_HEIGHT, orientation, intBounds.y); - bounds.height = _CoordinateSystemUtils::ConvertToFloat(intBounds.height); - bounds.y = _CoordinateSystemUtils::ConvertToFloat(intBounds.y); + GET_SHAPE_CONFIG(DATETIMEPICKER::FOOTER_HEIGHT, orientation, bounds.height); + GET_SHAPE_CONFIG(DATETIMEPICKER::INPUTPAD_HEIGHT, orientation, bounds.y); + bounds.x = 0.0f; bounds.y = GetBoundsF().height - bounds.y - bounds.height; bounds.width = GetBoundsF().width; @@ -913,7 +911,7 @@ _DateTimePicker::OnAttachedToMainTree(void) _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnResult(NID_UI_CTRL, (pElement != null), E_OUT_OF_MEMORY, "Memory allocation failed."); - Rectangle displayBoxBounds = _CoordinateSystemUtils::ConvertToInteger(pBox->GetDisplayBoxBounds()); + FloatRectangle displayBoxBounds = pBox->GetDisplayBoxBounds(); int displayBoxId = pBox->GetDisplayBoxId(); String hintText(L"Double tap to edit"); @@ -961,7 +959,7 @@ _DateTimePicker::OnAttachedToMainTree(void) _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnResult(NID_UI_CTRL, (pElement != null), E_OUT_OF_MEMORY, "Memory allocation failed."); - Rectangle amPmBoxBounds = _CoordinateSystemUtils::ConvertToInteger(pAmPmBox->GetDisplayBoxBounds()); + FloatRectangle amPmBoxBounds = pAmPmBox->GetDisplayBoxBounds(); if (__pDisplayVisualElement) { @@ -1044,7 +1042,7 @@ _DateTimePicker::OnChangeLayout(_ControlOrientation orientation) displayBoxBounds.y += __pDisplayVisualElement->GetBounds().y; } - pElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(displayBoxBounds)); + pElement->SetBounds(displayBoxBounds); } } index++; @@ -1132,7 +1130,7 @@ _DateTimePicker::OnFontChanged(Font* pFont) } void -_DateTimePicker::OnFontInfoRequested(unsigned long& style, int& size) +_DateTimePicker::OnFontInfoRequested(unsigned long& style, float& size) { style = FONT_STYLE_PLAIN; diff --git a/src/ui/controls/FUiCtrl_EditDate.cpp b/src/ui/controls/FUiCtrl_EditDate.cpp index 17facc3..01059d1 100644 --- a/src/ui/controls/FUiCtrl_EditDate.cpp +++ b/src/ui/controls/FUiCtrl_EditDate.cpp @@ -672,9 +672,9 @@ _EditDate::CreateAccessibilityElement(void) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - Rectangle dayBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY)); - Rectangle monthBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH)); - Rectangle yearBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR)); + FloatRectangle dayBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY); + FloatRectangle monthBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH); + FloatRectangle yearBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR); if (__pAccessibilityEditDateElement == null) { @@ -744,15 +744,15 @@ _EditDate::OnBoundsChanged(void) } if (__pAccessibilityYearElement) { - __pAccessibilityYearElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR))); + __pAccessibilityYearElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR)); } if (__pAccessibilityMonthElement) { - __pAccessibilityMonthElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH))); + __pAccessibilityMonthElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH)); } if (__pAccessibilityDayElement) { - __pAccessibilityDayElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY))); + __pAccessibilityDayElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY)); } return; @@ -906,7 +906,7 @@ _EditDate::OnFontChanged(Font* pFont) } void -_EditDate::OnFontInfoRequested(unsigned long& style, int& size) +_EditDate::OnFontInfoRequested(unsigned long& style, float& size) { __pEditDatePresenter->OnFontInfoRequested(style, size); diff --git a/src/ui/controls/FUiCtrl_EditDatePresenter.cpp b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp index 307c6ec..63744fe 100644 --- a/src/ui/controls/FUiCtrl_EditDatePresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp @@ -652,7 +652,7 @@ _EditDatePresenter::OnFontChanged(Font* pFont) } void -_EditDatePresenter::OnFontInfoRequested(unsigned long& style, int& size) +_EditDatePresenter::OnFontInfoRequested(unsigned long& style, float& size) { style = FONT_STYLE_PLAIN; size = __dateFontSize; diff --git a/src/ui/controls/FUiCtrl_EditTime.cpp b/src/ui/controls/FUiCtrl_EditTime.cpp index 2b9b26e..6fb6881 100644 --- a/src/ui/controls/FUiCtrl_EditTime.cpp +++ b/src/ui/controls/FUiCtrl_EditTime.cpp @@ -485,9 +485,9 @@ void _EditTime::CreateAccessibilityElement(void) { _AccessibilityContainer* pContainer = GetAccessibilityContainer(); - Rectangle hourBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR)); - Rectangle minuteBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE)); - Rectangle ampmBounds = _CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM)); + FloatRectangle hourBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + FloatRectangle minuteBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + FloatRectangle ampmBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); pContainer->AddListener(*this); if (__pAccessibilityEditTimeElement == null) @@ -536,15 +536,15 @@ _EditTime::OnBoundsChanged(void) } if (__pAccessibilityHourElement) { - __pAccessibilityHourElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR))); + __pAccessibilityHourElement->SetBounds(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR)); } if (__pAccessibilityMinuteElement) { - __pAccessibilityMinuteElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE))); + __pAccessibilityMinuteElement->SetBounds(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE)); } if (__pAccessibilityAmPmElement) { - __pAccessibilityAmPmElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM))); + __pAccessibilityAmPmElement->SetBounds(__pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM)); } return; @@ -697,7 +697,7 @@ _EditTime::OnFontChanged(Font* pFont) } void -_EditTime::OnFontInfoRequested(unsigned long& style, int& size) +_EditTime::OnFontInfoRequested(unsigned long& style, float& size) { __pEditTimePresenter->OnFontInfoRequested(style, size); diff --git a/src/ui/controls/FUiCtrl_EditTimePresenter.cpp b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp index 72b0053..aaac77c 100644 --- a/src/ui/controls/FUiCtrl_EditTimePresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp @@ -71,9 +71,9 @@ _EditTimePresenter::_EditTimePresenter(const String& title) , __textObject() , __pFont(null) , __titleObject() - , __amPmTextSize(0) - , __titleFontSize(0) - , __timeFontSize(0) + , __amPmTextSize(0.0f) + , __titleFontSize(0.0f) + , __timeFontSize(0.0f) , __isAnimating(false) , __isEditTimeInitialized(false) { @@ -559,11 +559,8 @@ _EditTimePresenter::Draw(void) SysAssertf((pCanvas != null), "Failed to get canvas."); FloatRectangle colonBounds(0.0f, 0.0f, 0.0f, 0.0f); - int colonWidth = 0; - int colonMargin = 0; - int colonHeight = 0; - float colonMarginF = 0.0f; + float colonMargin = 0.0f; Dimension textArea; @@ -624,15 +621,11 @@ _EditTimePresenter::Draw(void) SetTimeConversion(); - GET_SHAPE_CONFIG(EDITTIME::COLON_WIDTH, __pEditTime->GetOrientation(), colonWidth); + GET_SHAPE_CONFIG(EDITTIME::COLON_WIDTH, __pEditTime->GetOrientation(), colonBounds.width); GET_SHAPE_CONFIG(EDITTIME::COLON_MARGIN, __pEditTime->GetOrientation(), colonMargin); - GET_SHAPE_CONFIG(EDITTIME::AMPM_HEIGHT, __pEditTime->GetOrientation(), colonHeight); + GET_SHAPE_CONFIG(EDITTIME::AMPM_HEIGHT, __pEditTime->GetOrientation(), colonBounds.height); - colonBounds.width = _CoordinateSystemUtils::ConvertToFloat(colonWidth); - colonMarginF = _CoordinateSystemUtils::ConvertToFloat(colonMargin); - colonBounds.height = _CoordinateSystemUtils::ConvertToFloat(colonHeight); - - colonBounds.x = hourBounds.x + hourBounds.width + colonMarginF; + colonBounds.x = hourBounds.x + hourBounds.width + colonMargin; colonBounds.y = hourBounds.y + (hourBounds.height - colonBounds.height) / 2.0f; if (__title.IsEmpty() == false) @@ -704,7 +697,7 @@ _EditTimePresenter::DrawTitle(Canvas& canvas) } result -_EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const String& text, int textSize) +_EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const String& text, float textSize) { result r = E_SUCCESS; @@ -950,12 +943,10 @@ _EditTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& to FloatPoint startPoint(0.0f, 0.0f); - int titleHeight = 0; + float titleHeight = 0; GET_SHAPE_CONFIG(EDITTIME::TITLE_HEIGHT, __pEditTime->GetOrientation(), titleHeight); - startPoint.y = _CoordinateSystemUtils::ConvertToFloat(titleHeight); - - __bounds = FloatRectangle(startPoint.x, startPoint.y, bounds.width, bounds.height); + __bounds = FloatRectangle(0.0f, titleHeight, bounds.width, bounds.height); FloatPoint point = touchinfo.GetCurrentPosition(); @@ -1081,7 +1072,7 @@ _EditTimePresenter::OnFontChanged(Font* pFont) } void -_EditTimePresenter::OnFontInfoRequested(unsigned long& style, int& size) +_EditTimePresenter::OnFontInfoRequested(unsigned long& style, float& size) { style = FONT_STYLE_PLAIN; size = __timeFontSize; @@ -1094,13 +1085,9 @@ _EditTimePresenter::Initialize(void) { result r = E_SUCCESS; - int titleTimeMargin = 0; - int timeHeight = 0; - int editTimeHeight = 0; - - float fTitleTimeMargin = 0.0f; - float fTimeHeight = 0.0f; - float fEditTimeHeight = 0.0f; + float titleTimeMargin = 0; + float timeHeight = 0; + float editTimeHeight = 0; GET_SHAPE_CONFIG(EDITTIME::TEXT_FONT_SIZE, __pEditTime->GetOrientation(), __titleFontSize); GET_SHAPE_CONFIG(EDITTIME::TIME_FONT_SIZE, __pEditTime->GetOrientation(), __timeFontSize); @@ -1108,13 +1095,9 @@ _EditTimePresenter::Initialize(void) GET_SHAPE_CONFIG(EDITTIME::TIME_HEIGHT, __pEditTime->GetOrientation(), timeHeight); GET_SHAPE_CONFIG(EDITTIME::HEIGHT, __pEditTime->GetOrientation(), editTimeHeight); - fTitleTimeMargin = _CoordinateSystemUtils::ConvertToFloat(titleTimeMargin); - fTimeHeight = _CoordinateSystemUtils::ConvertToFloat(timeHeight); - fEditTimeHeight = _CoordinateSystemUtils::ConvertToFloat(editTimeHeight); - - if (__pEditTime->GetBoundsF().height > fEditTimeHeight) + if (__pEditTime->GetBoundsF().height > editTimeHeight) { - fEditTimeHeight = __pEditTime->GetBoundsF().height; + editTimeHeight = __pEditTime->GetBoundsF().height; } if (__title.IsEmpty() == false) @@ -1126,7 +1109,7 @@ _EditTimePresenter::Initialize(void) SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); } - __titleBounds.y = (fEditTimeHeight - (__titleBounds.height + fTitleTimeMargin + fTimeHeight)) / 2.0f; + __titleBounds.y = (editTimeHeight - (__titleBounds.height + titleTimeMargin + timeHeight)) / 2.0f; __titleObject.SetBounds(__titleBounds); } @@ -1152,7 +1135,6 @@ _EditTimePresenter::Initialize(void) void _EditTimePresenter::UpdateTimeFormat(void) { - if (!__is24hoursSet) { String key(L"http://tizen.org/setting/locale.time.format.24hour"); @@ -1280,10 +1262,10 @@ _EditTimePresenter::Animate(void) __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f)); pNewVisualElement->SetBounds(FloatRectangle(0.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f)); - rect.x = static_cast(__pContentProvider->GetBounds().x); - rect.y = static_cast(__pContentProvider->GetBounds().y); - rect.width = static_cast(__pContentProvider->GetBounds().width); - rect.height = static_cast(__pContentProvider->GetBounds().height); + rect.x = __pContentProvider->GetBounds().x; + rect.y = __pContentProvider->GetBounds().y; + rect.width = __pContentProvider->GetBounds().width; + rect.height = __pContentProvider->GetBounds().height; textPoint.x = (rect.width - oldTextDim.width) / 2.0f; textPoint.y = (rect.height - oldTextDim.height) / 2.0f; @@ -1297,10 +1279,10 @@ _EditTimePresenter::Animate(void) __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f)); pOldVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f)); - rect.x = static_cast(__pContentProvider->GetBounds().x); - rect.y = static_cast(__pContentProvider->GetBounds().y); - rect.width = static_cast(__pContentProvider->GetBounds().width); - rect.height = static_cast(__pContentProvider->GetBounds().height); + rect.x = __pContentProvider->GetBounds().x; + rect.y = __pContentProvider->GetBounds().y; + rect.width = __pContentProvider->GetBounds().width; + rect.height = __pContentProvider->GetBounds().height; textPoint.x = (rect.width - newTextDim.width) / 2.0f; textPoint.y = (rect.height - newTextDim.height) / 2.0f; @@ -1371,7 +1353,7 @@ _EditTimePresenter::Animate(void) return; - CATCH: +CATCH: __isAnimating = false; __pContentProvider->Destroy(); diff --git a/src/ui/controls/FUiCtrl_Progress.cpp b/src/ui/controls/FUiCtrl_Progress.cpp index 984327a..f961c39 100644 --- a/src/ui/controls/FUiCtrl_Progress.cpp +++ b/src/ui/controls/FUiCtrl_Progress.cpp @@ -122,7 +122,7 @@ _Progress::InitializeAccessibilityElement(void) { __pAccessibilityElement = new _AccessibilityElement(true); SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); __pAccessibilityElement->SetName(L"ProgressingImage"); __pAccessibilityElement->SetLabel(L"Progressing"); @@ -142,7 +142,7 @@ _Progress::OnAttachedToMainTree(void) { if (__pAccessibilityElement) { - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); } return E_SUCCESS; } @@ -152,7 +152,7 @@ _Progress::OnBoundsChanged(void) { if (__pAccessibilityElement) { - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); } return; diff --git a/src/ui/controls/FUiCtrl_Slider.cpp b/src/ui/controls/FUiCtrl_Slider.cpp index 92f2368..be92732 100644 --- a/src/ui/controls/FUiCtrl_Slider.cpp +++ b/src/ui/controls/FUiCtrl_Slider.cpp @@ -222,7 +222,7 @@ _Slider::InitializeAccessibilityElement(void) __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); __pAccessibilityElement->SetLabel(__titleText); __pAccessibilityElement->SetName(L"SliderControl"); __pAccessibilityElement->SetTrait(L"Slider"); @@ -248,7 +248,7 @@ _Slider::OnAttachedToMainTree(void) { if(__pAccessibilityElement) { - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); } return E_SUCCESS; } @@ -324,7 +324,7 @@ _Slider::OnBoundsChanged(void) if (__pAccessibilityElement) { - __pAccessibilityElement->SetBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); } return; @@ -834,7 +834,7 @@ _Slider::OnFontChanged(Font* pFont) } void -_Slider::OnFontInfoRequested(unsigned long& style, int& size) +_Slider::OnFontInfoRequested(unsigned long& style, float& size) { __pSliderPresenter->OnFontInfoRequested(style, size); return; diff --git a/src/ui/controls/FUiCtrl_SliderPresenter.cpp b/src/ui/controls/FUiCtrl_SliderPresenter.cpp index 6712e3c..340b9ee 100644 --- a/src/ui/controls/FUiCtrl_SliderPresenter.cpp +++ b/src/ui/controls/FUiCtrl_SliderPresenter.cpp @@ -87,7 +87,7 @@ _SliderPresenter::_SliderPresenter(void) , __isCustomHandle(false) , __isCustomPressedTextColor(false) , __groupStyle(GROUP_STYLE_NONE) - , __fontSize(0) + , __fontSize(0.0f) , __barOffset(0.0f) { } @@ -1596,7 +1596,7 @@ _SliderPresenter::OnFontChanged(Font* pFont) } void -_SliderPresenter::OnFontInfoRequested(unsigned long& style, int& size) +_SliderPresenter::OnFontInfoRequested(unsigned long& style, float& size) { style = FONT_STYLE_BOLD; size = __fontSize; diff --git a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp index 9757235..afc39b0 100644 --- a/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp @@ -104,7 +104,7 @@ _Token::_Token(const String& text, Font* pEditFont) result r = E_SUCCESS; currTokenLength = text.GetLength(); - int tokenFontSize = 0; + float tokenFontSize = 0; pTextObject = new (std::nothrow) TextObject; SysTryReturnVoidResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -308,7 +308,7 @@ result _TokenEditPresenter::InitializeDescriptionText(void) { result r = E_SUCCESS; - int descriptionTextSize = 0; + float descriptionTextSize = 0; __pDescriptionTextTextObject = new (std::nothrow) TextObject(); SysTryReturnResult(NID_UI_CTRL, __pDescriptionTextTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); @@ -448,11 +448,11 @@ _TokenEditPresenter::Initialize(const _Control& control) SetKeypadEnabled(true); - int tokenLeftMargin = 0; - int tokenRightMargin = 0; - int tokenTopMargin = 0; - int tokenBottomMargin = 0; - int tokenHeight = 0; + float tokenLeftMargin = 0; + float tokenRightMargin = 0; + float tokenTopMargin = 0; + float tokenBottomMargin = 0; + float tokenHeight = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin); @@ -472,7 +472,7 @@ _TokenEditPresenter::Initialize(const _Control& control) FloatRectangle tempDspRect(__initTextRect.x, __initTextRect.y, __clientRect.width, tokenHeight); SetTextBounds(tempDspRect); - int textSize = 0; + float textSize = 0; GET_SHAPE_CONFIG(TOKENEDIT::TEXT_SIZE, orientation, textSize); Font* pFont = new (std::nothrow) Font(); @@ -664,8 +664,8 @@ _TokenEditPresenter::DrawToken(int count) { int drawStartIndex = 0; int tokenCount = 0; - int tokenTextLeftMargin = 0; - int tokenVerticalSpacing = 0; + float tokenTextLeftMargin = 0; + float tokenVerticalSpacing = 0; bool isCustomBitmap = false; SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); @@ -1184,16 +1184,16 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa int tokenCount = __pTokenList->GetCount(); - int tokenLeftMargin = 0; - int tokenRighttMargin = 0; - int tokenTopMargin = 0; - int tokenBottomMargin = 0; - int tokenHeight = 0; - int tokenVerticalSpacing = 0; - int tokenHorizontalSpacing = 0; - int tokenTextLeftMargin = 0; - int tokenTextRightMargin = 0; - int descriptionTextRightMargin = 0; + float tokenLeftMargin = 0; + float tokenRighttMargin = 0; + float tokenTopMargin = 0; + float tokenBottomMargin = 0; + float tokenHeight = 0; + float tokenVerticalSpacing = 0; + float tokenHorizontalSpacing = 0; + float tokenTextLeftMargin = 0; + float tokenTextRightMargin = 0; + float descriptionTextRightMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, tokenLeftMargin); @@ -1315,13 +1315,13 @@ _TokenEditPresenter::SetInitialBounds(void) { result r = E_SUCCESS; - int tokenTopMargin = 0; - int tokenHeight = 0; - int tokenMinWidth = 0; - int tokenVerticalSpacing = 0; - int tokenHorizontalSpacing = 0; - int tokenTextLeftMargin = 0; - int tokenTextRightMargin = 0; + float tokenTopMargin = 0; + float tokenHeight = 0; + float tokenMinWidth = 0; + float tokenVerticalSpacing = 0; + float tokenHorizontalSpacing = 0; + float tokenTextLeftMargin = 0; + float tokenTextRightMargin = 0; _ControlOrientation orientation = GetEditView()->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); @@ -1420,8 +1420,8 @@ _TokenEditPresenter::GetTextBounds(void) const SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token."); _ControlOrientation orientation = __pTokenEdit->GetOrientation(); - int tokenTextLeftMargin = 0; - int tokenTextVerticalMargin = 0; + float tokenTextLeftMargin = 0; + float tokenTextVerticalMargin = 0; GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenTextVerticalMargin); @@ -1577,12 +1577,12 @@ _TokenEditPresenter::CalculateDescriptionTextRect(const String& descriptionText) result r = E_SUCCESS; TextSimple* pSimpleText = null; - int tokenTopMargin = 0; - int tokenHeight = 0; - int tokenVerticalSpacing = 0; - int tokenTextLeftMargin = 0; - int tokenTextRightMargin = 0; - int tokenTitleWidth = 0; + float tokenTopMargin = 0; + float tokenHeight = 0; + float tokenVerticalSpacing = 0; + float tokenTextLeftMargin = 0; + float tokenTextRightMargin = 0; + float tokenTitleWidth = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); @@ -1659,7 +1659,7 @@ _TokenEditPresenter::DrawDescriptionText(void) if (__pDescriptionTextTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName()) { - int descriptionTextSize = 0; + float descriptionTextSize = 0; GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize); pDescriptionFont = new (std::nothrow) Font(); @@ -1779,8 +1779,8 @@ _TokenEditPresenter::TrimTokenAndAdjustEllipsisAt(int index) { result r = E_SUCCESS; - int tokenTextRightMargin = 0; - int tokenMinimumSize = 0; + float tokenTextRightMargin = 0; + float tokenMinimumSize = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin); @@ -1846,9 +1846,9 @@ _TokenEditPresenter::SetEditingTokenTextBounds(int index, bool isSetText) { result r = E_SUCCESS; - int tokenHeight = 0; - int tokenVerticalSpacing = 0; - int tokenTextLeftMargin = 0; + float tokenHeight = 0; + float tokenVerticalSpacing = 0; + float tokenTextLeftMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); @@ -2223,9 +2223,9 @@ result _TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition) { bool needToScroll = false; - int tokenTopMargin = 0; - int tokenBottomMargin = 0; - int tokenVerticalSpacing = 0; + float tokenTopMargin = 0; + float tokenBottomMargin = 0; + float tokenVerticalSpacing = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); @@ -2321,10 +2321,10 @@ _TokenEditPresenter::AdjustFlexibleHeight(void) float _TokenEditPresenter::CalculateFlexibleHeightF(void) { - int tokenHeight = 0; - int tokenVerticalSpacing = 0; - int tokenTopMargin = 0; - int tokenBottomMargin = 0; + float tokenHeight = 0; + float tokenVerticalSpacing = 0; + float tokenTopMargin = 0; + float tokenBottomMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); @@ -2383,7 +2383,7 @@ _TokenEditPresenter::DrawScrollBar(void) return E_SUCCESS; } - int tokenBottomMargin = 0; + float tokenBottomMargin = 0; GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin); float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin; @@ -2850,9 +2850,9 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText) pToken->ResetToken(GetText()); TrimTokenAndAdjustEllipsisAt(__edittingTokenIndex); - int tokenHeight = 0; - int tokenVerticalSpacing = 0; - int tokenTextLeftMargin = 0; + float tokenHeight = 0; + float tokenVerticalSpacing = 0; + float tokenTextLeftMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); @@ -2884,8 +2884,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText) SetCursorDisabled(false); } - int tokenTopMargin = 0; - + float tokenTopMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); @@ -3144,9 +3143,9 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) if (pToken) { - int tokenHeight = 0; - int tokenVerticalSpacing = 0; - int tokenTextLeftMargin = 0; + float tokenHeight = 0; + float tokenVerticalSpacing = 0; + float tokenTextLeftMargin = 0; SetCursorPosition(__previousCursorPosition); @@ -3338,7 +3337,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc _Scroll* pScroll = GetScrollBar(); if (pScroll) { - int tokenBottomMargin = 0; + float tokenBottomMargin = 0; GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin); float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin; @@ -3405,7 +3404,7 @@ _TokenEditPresenter::ResizeTokenAndAdjustEllipsis(int index, float value, bool i pToken = static_cast <_Token*>(__pTokenList->GetAt(index)); SysTryReturn(NID_UI_CTRL, pToken != null, -1.0f, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); - int tokenMinimumSize = 0; + float tokenMinimumSize = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); @@ -3437,8 +3436,8 @@ _TokenEditPresenter::ResizeTokenAndAdjustEllipsis(int index, float value, bool i pToken = static_cast <_Token*>(__pTokenList->GetAt(index)); SysTryReturn(NID_UI_CTRL, pToken != null, -1.0f, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null."); - int tokenTextLeftMargin = 0; - int tokenTextRightMargin = 0; + float tokenTextLeftMargin = 0; + float tokenTextRightMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); @@ -3474,9 +3473,9 @@ _TokenEditPresenter::PickToken(int index, FloatRectangle tokenDispRect, bool isT { int tokenCount = __pTokenList->GetCount(); - int tokenMinimumSize = 0; - int tokenTextLeftMargin = 0; - int tokenTextRightMargin = 0; + float tokenMinimumSize = 0; + float tokenTextLeftMargin = 0; + float tokenTextRightMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); @@ -3580,7 +3579,7 @@ _TokenEditPresenter::RepositionToken(int currentTokenIndex, float moveDistance, void _TokenEditPresenter::ShrinkTokens() { - int tokenTextRightMargin = 0; + float tokenTextRightMargin = 0; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin); @@ -3667,7 +3666,7 @@ _TokenEditPresenter::ShrinkTokens() float _TokenEditPresenter::GetPickedTokenEndPoint(int index, Tizen::Graphics::FloatRectangle tokenDispRect) { - int tokenTextRightMargin = 0; + float tokenTextRightMargin = 0; float endValue = 0.0f; _ControlOrientation orientation = __pTokenEdit->GetOrientation(); @@ -3857,7 +3856,7 @@ _TokenEditPresenter::ChangeInternalLayout(_ControlOrientation orientation) __scrollValue = 0.0f; __maxScrollValue = 0.0f; - int tokenBottomMargin = 0; + float tokenBottomMargin = 0; float newScrollValue = 0.0f; FloatRectangle windowBounds = GetInitialBoundsF(); diff --git a/src/ui/inc/FUiCtrl_DateTimePicker.h b/src/ui/inc/FUiCtrl_DateTimePicker.h index e5d004a..f1d36b9 100644 --- a/src/ui/inc/FUiCtrl_DateTimePicker.h +++ b/src/ui/inc/FUiCtrl_DateTimePicker.h @@ -156,7 +156,7 @@ public: virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); virtual void OnFontChanged(Tizen::Graphics::Font* pFont); - virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontInfoRequested(unsigned long& style, float& size); Tizen::Graphics::Font* GetDateTimeFont(void); result InitializeFont(void); diff --git a/src/ui/inc/FUiCtrl_EditDate.h b/src/ui/inc/FUiCtrl_EditDate.h index 01adea6..e8f8497 100644 --- a/src/ui/inc/FUiCtrl_EditDate.h +++ b/src/ui/inc/FUiCtrl_EditDate.h @@ -129,7 +129,7 @@ public: virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); virtual void OnFontChanged(Tizen::Graphics::Font* pFont); - virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontInfoRequested(unsigned long& style, float& size); virtual void OnSettingChanged(Tizen::Base::String& key); Tizen::Graphics::FloatRectangle GetParentWindowBounds(void) const; diff --git a/src/ui/inc/FUiCtrl_EditDatePresenter.h b/src/ui/inc/FUiCtrl_EditDatePresenter.h index 39bf7ad..223a272 100644 --- a/src/ui/inc/FUiCtrl_EditDatePresenter.h +++ b/src/ui/inc/FUiCtrl_EditDatePresenter.h @@ -77,7 +77,7 @@ public: virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); void OnFontChanged(Tizen::Graphics::Font* pFont); - void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); virtual void OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally); virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){} diff --git a/src/ui/inc/FUiCtrl_EditTime.h b/src/ui/inc/FUiCtrl_EditTime.h index 0e252b2..e3f8785 100644 --- a/src/ui/inc/FUiCtrl_EditTime.h +++ b/src/ui/inc/FUiCtrl_EditTime.h @@ -114,7 +114,7 @@ public: virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); void OnFontChanged(Tizen::Graphics::Font* pFont); - void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); virtual void OnSettingChanged(Tizen::Base::String& key); Tizen::Graphics::FloatRectangle GetParentWindowBounds(void) const; diff --git a/src/ui/inc/FUiCtrl_EditTimePresenter.h b/src/ui/inc/FUiCtrl_EditTimePresenter.h index ac4c5fb..73bf023 100644 --- a/src/ui/inc/FUiCtrl_EditTimePresenter.h +++ b/src/ui/inc/FUiCtrl_EditTimePresenter.h @@ -75,7 +75,7 @@ public: virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); void OnFontChanged(Tizen::Graphics::Font* pFont); - void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); result Initialize(void); void UpdateTimeFormat(void); @@ -92,7 +92,7 @@ private: void SetTimeConversion(void); result DrawTitle(Tizen::Graphics::Canvas& canvas); - result DrawText(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& text, int textSize = 0); + result DrawText(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& text, float textSize = 0.0f); result DrawColon(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds); _DateTimeId GetBoxIdFromPosition(const Tizen::Graphics::FloatPoint& point) const; void SetLastSelectedId(_DateTimeId boxId); @@ -136,9 +136,9 @@ private: Tizen::Graphics::Font* __pFont; Tizen::Graphics::_Text::TextObject __titleObject; - int __amPmTextSize; - int __titleFontSize; - int __timeFontSize; + float __amPmTextSize; + float __titleFontSize; + float __timeFontSize; bool __isAnimating; bool __isEditTimeInitialized; }; // _EditTimePresenter diff --git a/src/ui/inc/FUiCtrl_Slider.h b/src/ui/inc/FUiCtrl_Slider.h index 43f3e65..a376cd8 100644 --- a/src/ui/inc/FUiCtrl_Slider.h +++ b/src/ui/inc/FUiCtrl_Slider.h @@ -133,7 +133,7 @@ public: virtual result OnAttachedToMainTree(void); virtual void OnFontChanged(Tizen::Graphics::Font* pFont); - virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontInfoRequested(unsigned long& style, float& size); // accessibility listener virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} diff --git a/src/ui/inc/FUiCtrl_SliderPresenter.h b/src/ui/inc/FUiCtrl_SliderPresenter.h index 5b6d41e..6318b91 100644 --- a/src/ui/inc/FUiCtrl_SliderPresenter.h +++ b/src/ui/inc/FUiCtrl_SliderPresenter.h @@ -63,7 +63,7 @@ public: virtual void OnBoundsChanged(void); void OnFontChanged(Tizen::Graphics::Font* pFont); - void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); static _SliderPresenter* CreateInstanceN(const _Slider& slider); result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap); @@ -157,7 +157,7 @@ private: bool __isCustomHandle; bool __isCustomPressedTextColor; GroupStyle __groupStyle; - int __fontSize; + float __fontSize; float __barOffset; }; // _SliderPresenter -- 2.7.4