if(!m_CUtilTextImgLoading)
{
- m_CUtilTextImgLoading = ClusterHome3D::CUtilTextImge::New();
- // need supply enough canvas space to draw, or else the area under the baseline not rendered
- m_CUtilTextImgLoading.SetTextSize(BOX_LOADING_TEXT_WIDTH, BOX_LOADING_TEXT_SIZE * 3);
- int fontSize = BOX_LOADING_TEXT_SIZE;
- Vector4 textColor((float)255/255, (float)255/255, (float)255/255, 1);
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
- m_CUtilTextImgLoading.SetTextInfo(fontSize, color, "", false);
- m_CUtilTextImgLoading.SetTextName(_("IDS_ST_BODY_LOADING_ING"),false,false);
- m_CUtilTextImgLoading.SetTextAlignment("center","center");
- m_CUtilTextImgLoading.CreateImage();
+ m_CUtilTextImgLoading = Toolkit::TextLabel::New( _("IDS_ST_BODY_LOADING_ING") );
+ m_CUtilTextImgLoading.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,BOX_LOADING_TEXT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImgLoading.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,Color::WHITE);
+ m_CUtilTextImgLoading.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"CENTER");
+ m_CUtilTextImgLoading.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
m_CUtilTextImgLoading.SetParentOrigin(ParentOrigin::CENTER);
m_CUtilTextImgLoading.SetAnchorPoint(AnchorPoint::CENTER);
m_CUtilTextImgLoading.SetSize(BOX_LOADING_TEXT_WIDTH, BOX_LOADING_TEXT_SIZE * 3);
m_CUtilTextImgLoading.SetOpacity(0.0f);
}
- m_CUtilTextImgFault = ClusterHome3D::CUtilTextImge::New();
TEST_DBG("box size %f,%f",mBoxSize.width,mBoxSize.height);
- m_CUtilTextImgFault.SetTextSize(BOX_FAULT_TEXT_WIDTH, BOX_FAULT_TEXT_SIZE*2.5);
-
- int fontSize = BOX_FAULT_TEXT_SIZE;
- Vector4 textColor((float)255/255, (float)255/255, (float)255/255, 1);
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
- m_CUtilTextImgFault.SetTextInfo(fontSize, color, "", false);
- m_CUtilTextImgFault.SetTextName(_("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"),false,false);
- m_CUtilTextImgFault.SetTextAlignment("center","center");
- m_CUtilTextImgFault.CreateImage();
-
+ m_CUtilTextImgFault = Toolkit::TextLabel::New( _("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY") );
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,BOX_FAULT_TEXT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,Color::WHITE);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"CENTER");
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
+ m_CUtilTextImgFault.SetSize(BOX_FAULT_TEXT_WIDTH, BOX_FAULT_TEXT_SIZE * 2.5);
m_CUtilTextImgFault.SetAnchorPoint(AnchorPoint::CENTER);
m_CUtilTextImgFault.SetParentOrigin(ParentOrigin::CENTER);
-
m_CUtilTextImgFault.SetZ(0.1f);
mFaultDim.Add(m_CUtilTextImgFault);
// Set text "Loading..."
if (m_CUtilTextImgFault)
{
- int fontSize = BOX_FAULT_TEXT_SIZE;
- Vector4 textColor((float)255/255, (float)255/255, (float)255/255, 1);
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
-
- m_CUtilTextImgFault.SetTextInfo(fontSize, color, "", true);
- m_CUtilTextImgFault.SetTextName(_("IDS_ST_BODY_LOADING_ING"), false, false);
- m_CUtilTextImgFault.ReCreateImage();
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,BOX_FAULT_TEXT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,Color::WHITE);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,_("IDS_ST_BODY_LOADING_ING"));
}
}
else
// Set text "Tap to reload"
if (m_CUtilTextImgFault)
{
- int fontSize = BOX_FAULT_TEXT_SIZE;
- Vector4 textColor((float)255/255, (float)255/255, (float)255/255, 1);
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
-
- m_CUtilTextImgFault.SetTextInfo(fontSize, color, "", true);
- m_CUtilTextImgFault.SetTextName(_("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"), false, false);
- m_CUtilTextImgFault.ReCreateImage();
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,BOX_FAULT_TEXT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,Color::WHITE);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,_("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"));
}
}
}
if(m_CUtilTextImgFault)
{
- int fontSize = BOX_FAULT_TEXT_SIZE;
- Vector4 textColor((float)255/255, (float)255/255, (float)255/255, 1);
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,BOX_FAULT_TEXT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,Color::WHITE);
+ m_CUtilTextImgFault.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,_("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"));
- m_CUtilTextImgFault.SetTextInfo(fontSize, color, "", true);
- m_CUtilTextImgFault.SetTextName(_("IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY"), false, false);
- m_CUtilTextImgFault.ReCreateImage();
}
}
TapGestureDetector mTapDetector;
LongPressGestureDetector m_BoxLongpressDetector;
- ClusterHome3D::CUtilTextImge m_CUtilTextImgFault;
+ Dali::Toolkit::TextLabel m_CUtilTextImgFault;
/*
* For description
// Badge count textLabel
Dali::Toolkit::TextLabel mBadgeCountText;
- ClusterHome3D::CUtilTextImge m_CUtilTextImgLoading;
+ Dali::Toolkit::TextLabel m_CUtilTextImgLoading;
/*
* Animations
Dali::ImageActor mEditModePageBg;
bool mIsDeletePageButtonEnabled;
- ClusterHome3D::CUtilTextImge mDeletePageButtonTextImg;
-
Dali::Toolkit::PushButton mEditModeAddButton;
ImageActor mGlassImage;
#define BADGE_ICON_GAP_X Scalable::GetX(13*(480.0f/720.0f))
#define BADGE_ICON_GAP_Y Scalable::GetY(3*(800.0f/1280.0f))
-#define BADGE_FONT_SIZE Scalable::GetFontSize(12*(800.0f/1280.0f))
+#define BADGE_FONT_SIZE 34*DALI_TEXT_CONST/DALI_DPI.y
CHomeScreenBadge::CHomeScreenBadge(BadgeType eBadgeType, unsigned int nCount) :
m_eBadgeType(eBadgeType),
TEST_DBG("fContentTextW:%f,fContentTextH:%f",fContentTextW,fContentTextH);
- m_PopupContentTextImg = ClusterHome3D::CUtilTextImge::New();
- m_PopupContentTextImg.SetTextSize(fContentTextW, fContentTextH);
-
- int fontSize = CENTER_POPUP_CONTENT_TEXT_FONT_SIZE;
-
- TEST_DBG("fontSize:%d",fontSize);
-
- Vector4 textColor = CENTER_POPUP_CONTENT_TEXT_FONT_COLOR;
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
-
- m_PopupContentTextImg.SetTextInfo(fontSize, color, "", false);
- m_PopupContentTextImg.SetTextName(strText,false,false);
+ m_PopupContentTextImg = Dali::Toolkit::TextLabel::New();
+ m_PopupContentTextImg.SetSize(fContentTextW, fContentTextH);
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,CENTER_POPUP_CONTENT_TEXT_FONT_COLOR);
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,CENTER_POPUP_CONTENT_TEXT_FONT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strText);
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::MULTI_LINE,true);
if (isTextAlignRight)
{
- m_PopupContentTextImg.SetTextAlignment("top","right");
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"TOP");
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"END");
}
else
{
- m_PopupContentTextImg.SetTextAlignment("top","left");
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"TOP");
+ m_PopupContentTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"BEGIN");
}
- m_PopupContentTextImg.CreateImage();
int actualWidth,actualHeight;
- m_PopupContentTextImg.GetActualSize(actualWidth,actualHeight);
+ actualWidth = fContentTextW;
+ actualHeight = m_PopupContentTextImg.GetHeightForWidth( actualWidth );
m_PopupContentTextImg.SetAnchorPoint(AnchorPoint::TOP_LEFT);
m_PopupContentTextImg.SetParentOrigin(ParentOrigin::TOP_LEFT);
m_PopupContentTextImg.SetPosition(fContentTextX, fContentTextY, 0.4f);
*/
- ClusterHome3D::CUtilTextImge aTextLabel = ClusterHome3D::CUtilTextImge::New();
- aTextLabel.SetTextSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 2), fListH);
-
- int fontSize = MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_SIZE;
-
- Vector4 textColor = MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_COLOR;
- char color[10] = {'0'};
- snprintf(color, sizeof(color), "%.2x%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255), (unsigned int)(textColor.a*255));
+ Dali::Toolkit::TextLabel aTextLabel = Dali::Toolkit::TextLabel::New();
+ aTextLabel.SetSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 2), fListH);
- aTextLabel.SetTextInfo(fontSize, color, "", false);
- aTextLabel.SetTextName(strLabel,false,false);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_COLOR);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strLabel);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
if (isTextAlignRight)
{
- aTextLabel.SetTextAlignment("center","right");
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"END");
}
else
{
- aTextLabel.SetTextAlignment("center","left");
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"BEGIN");
}
- aTextLabel.CreateImage();
float fLabelX = CENTER_POPUP_CONTENT_SIZE_W;
aTextLabel.SetPosition(fLabelX, 0.0f, 0.0f);
aNormalBg.Add(aTextLabel);
- ClusterHome3D::CUtilTextImge aTextPressLabel = ClusterHome3D::CUtilTextImge::New();
- aTextPressLabel.SetTextSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 2), fListH);
-
- int pressFontSize = MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_SIZE;
-
- Vector4 pressTextColor = MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_COLOR;
- char pressColor[10] = {'0'};
- snprintf(pressColor, sizeof(pressColor), "%.2x%.2x%.2x%.2x", (unsigned int)(pressTextColor.r*255), (unsigned int)(pressTextColor.g*255), (unsigned int)(pressTextColor.b*255), (unsigned int)(textColor.a*255));
-
- aTextPressLabel.SetTextInfo(pressFontSize, pressColor, "", false);
- aTextPressLabel.SetTextName(strLabel,false,false);
+ Dali::Toolkit::TextLabel aTextPressLabel = Dali::Toolkit::TextLabel::New();
+ aTextPressLabel.SetSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 2), fListH);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_COLOR);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strLabel);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
if (isTextAlignRight)
{
- aTextPressLabel.SetTextAlignment("center","right");
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"END");
}
else
{
- aTextPressLabel.SetTextAlignment("center","left");
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"BEGIN");
}
- aTextPressLabel.CreateImage();
-
aTextPressLabel.SetPosition(fLabelX, 0.0f, 0.0f);
-
aTextPressLabel.SetAnchorPoint(Dali::AnchorPoint::TOP_LEFT);
aTextPressLabel.SetParentOrigin(Dali::ParentOrigin::TOP_LEFT);
pItem->m_bActivated = bSelected;
- ClusterHome3D::CUtilTextImge aTextLabel = ClusterHome3D::CUtilTextImge::New();
- aTextLabel.SetTextSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 3 - CENTER_POPUP_LIST_RADIO_BUTTON_SIZE_W), fListH);
- int fontSize = MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_SIZE;
-
- Vector4 textColor = MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_COLOR;
- char color[10] = {'0'};
- snprintf(color, sizeof(color), "%.2x%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255), (unsigned int)(textColor.a*255));
-
- aTextLabel.SetTextInfo(fontSize, color, "", false);
- aTextLabel.SetTextName(strLabel,false,false);
+ Dali::Toolkit::TextLabel aTextLabel = Dali::Toolkit::TextLabel::New();
+ aTextLabel.SetSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 3 - CENTER_POPUP_LIST_RADIO_BUTTON_SIZE_W), fListH);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_COLOR);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strLabel);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
if (isTextAlignRight)
{
- aTextLabel.SetTextAlignment("center","right");
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"END");
}
else
{
- aTextLabel.SetTextAlignment("center","left");
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"BEGIN");
}
- aTextLabel.CreateImage();
-
float fLabelX = CENTER_POPUP_CONTENT_SIZE_W;
aTextLabel.SetAnchorPoint(Dali::AnchorPoint::TOP_LEFT);
aTextLabel.SetParentOrigin(Dali::ParentOrigin::TOP_LEFT);
aTextLabel.SetPosition(fLabelX, 0.0f, 0.0f);
-
aNormalBg.Add(aTextLabel);
- ClusterHome3D::CUtilTextImge aTextPressLabel = ClusterHome3D::CUtilTextImge::New();
- aTextPressLabel.SetTextSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 3 - CENTER_POPUP_LIST_RADIO_BUTTON_SIZE_W), fListH);
-
- int pressFontSize = MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_SIZE;
- Vector4 pressTextColor = MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_COLOR;
- char pressColor[10] = {'0'};
- snprintf(pressColor, sizeof(pressColor), "%.2x%.2x%.2x%.2x", (unsigned int)(pressTextColor.r*255), (unsigned int)(pressTextColor.g*255), (unsigned int)(pressTextColor.b*255), (unsigned int)(pressTextColor.a*255));
-
- aTextPressLabel.SetTextInfo(pressFontSize, pressColor, "", false);
- aTextPressLabel.SetTextName(strLabel,false,false);
+ Dali::Toolkit::TextLabel aTextPressLabel = Dali::Toolkit::TextLabel::New();
+ aTextPressLabel.SetSize((CENTER_POPUP_WIDTH - (CENTER_POPUP_CONTENT_SIZE_W + CENTER_POPUP_SIZE_W) * 3 - CENTER_POPUP_LIST_RADIO_BUTTON_SIZE_W), fListH);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_COLOR);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strLabel);
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
if (isTextAlignRight)
{
- aTextPressLabel.SetTextAlignment("center","right");
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"END");
}
else
{
- aTextPressLabel.SetTextAlignment("center","left");
+ aTextPressLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"BEGIN");
}
- aTextPressLabel.CreateImage();
-
aTextPressLabel.SetPosition(fLabelX, 0.0f, 0.0f);
aTextPressLabel.SetAnchorPoint(Dali::AnchorPoint::TOP_LEFT);
aTextPressLabel.SetParentOrigin(Dali::ParentOrigin::TOP_LEFT);
float fTitleTextWidth = (CENTER_POPUP_WIDTH - (CENTER_POPUP_SIZE_W + CENTER_POPUP_CONTENT_SIZE_W) * 2);
float fTitleTextHeight = CENTER_POPUP_TITLE_HEIGHT;
- mPopupTitleTextImg = ClusterHome3D::CUtilTextImge::New();
- mPopupTitleTextImg.SetTextSize(fTitleTextWidth, fTitleTextHeight);
-
- Vector4 textColor = CENTER_POPUP_TITLE_TEXT_COLOR;
- char color[10] = {'0'};
- snprintf(color, sizeof(color), "%.2x%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255), (unsigned int)(textColor.a*255));
-
- int fontSize = CENTER_POPUP_TITLE_TEXT_SIZE;
-
- mPopupTitleTextImg.SetTextInfo(fontSize, color, "0000004C", false);
- mPopupTitleTextImg.SetTextName(strTitle,false,false);
- mPopupTitleTextImg.SetTextAlignment("center","center");
-
- mPopupTitleTextImg.CreateImage();
+ mPopupTitleTextImg = Dali::Toolkit::TextLabel::New();
+ mPopupTitleTextImg.SetSize(fTitleTextWidth, fTitleTextHeight);
+ mPopupTitleTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,CENTER_POPUP_TITLE_TEXT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ mPopupTitleTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,CENTER_POPUP_TITLE_TEXT_COLOR);
+ mPopupTitleTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strTitle);
+ mPopupTitleTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
+ mPopupTitleTextImg.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"CENTER");
mPopupTitleTextImg.SetPosition(CENTER_POPUP_CONTENT_SIZE_W, 0.0f, 0.1f);
-
mPopupTitleTextImg.SetAnchorPoint(Dali::AnchorPoint::TOP_LEFT);
mPopupTitleTextImg.SetParentOrigin(Dali::ParentOrigin::TOP_LEFT);
-
m_aPopupTitleBg.Add(mPopupTitleTextImg);
float fW = CENTER_POPUP_WIDTH;
m_aPopupButtonCenter.SetAnchorPoint(AnchorPoint::CENTER);
m_aPopupButtonCenter.SetParentOrigin(ParentOrigin::CENTER);
- m_aPopupButtonCenter.SetPosition(0.0f, 0.0f, 0.0f);
+ m_aPopupButtonCenter.SetPosition(0.0f, 0.0f, 0.1f);
m_aPopupButtonCenter.ClickedSignal().Connect(this, &CHomeScreenCenterPopup::_OnButtonClicked);
m_aPopupButtonLeft.SetAnchorPoint(AnchorPoint::CENTER_LEFT);
m_aPopupButtonLeft.SetParentOrigin(ParentOrigin::CENTER_LEFT);
- m_aPopupButtonLeft.SetPosition(CENTER_POPUP_BUTTON_GAP_X, 0.0f, 0.0f);
+ m_aPopupButtonLeft.SetPosition(CENTER_POPUP_BUTTON_GAP_X, 0.0f, 0.1f);
m_aPopupButtonLeft.ClickedSignal().Connect(this, &CHomeScreenCenterPopup::_OnButtonClicked);
m_aPopupButtonRight.SetAnchorPoint(AnchorPoint::CENTER_RIGHT);
m_aPopupButtonRight.SetParentOrigin(ParentOrigin::CENTER_RIGHT);
- m_aPopupButtonRight.SetPosition(-1.0f*CENTER_POPUP_BUTTON_GAP_X, 0.0f, 0.0f);
+ m_aPopupButtonRight.SetPosition(-1.0f*CENTER_POPUP_BUTTON_GAP_X, 0.0f, 0.1f);
m_aPopupButtonRight.ClickedSignal().Connect(this, &CHomeScreenCenterPopup::_OnButtonClicked);
if (m_aPopupButtonLeft)
{
focusManager.SetFocusOrder(m_aPopupButtonLeft, nOrder++);
- focusManager.SetAccessibilityAttribute(m_aPopupButtonLeft, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_PopupButtonTextLeftImg.GetText());
+ focusManager.SetAccessibilityAttribute(m_aPopupButtonLeft, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_PopupButtonTextLeftImg.GetProperty<std::string>( Toolkit::TextLabel::Property::TEXT ));
focusManager.SetAccessibilityAttribute(m_aPopupButtonLeft, Toolkit::AccessibilityManager::ACCESSIBILITY_HINT, _("IDS_HS_BODY_BUTTON_T_TTS"));
}
if (m_aPopupButtonCenter)
{
focusManager.SetFocusOrder(m_aPopupButtonCenter, nOrder++);
- focusManager.SetAccessibilityAttribute(m_aPopupButtonCenter, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_PopupButtonTextCenterImg.GetText());
+ focusManager.SetAccessibilityAttribute(m_aPopupButtonCenter, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_PopupButtonTextCenterImg.GetProperty<std::string>( Toolkit::TextLabel::Property::TEXT ));
focusManager.SetAccessibilityAttribute(m_aPopupButtonCenter, Toolkit::AccessibilityManager::ACCESSIBILITY_HINT, _("IDS_HS_BODY_BUTTON_T_TTS"));
}
if (m_aPopupButtonRight)
{
focusManager.SetFocusOrder(m_aPopupButtonRight, nOrder++);
- focusManager.SetAccessibilityAttribute(m_aPopupButtonRight, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_PopupButtonTextRightImg.GetText());
+ focusManager.SetAccessibilityAttribute(m_aPopupButtonRight, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_PopupButtonTextRightImg.GetProperty<std::string>( Toolkit::TextLabel::Property::TEXT ));
focusManager.SetAccessibilityAttribute(m_aPopupButtonRight, Toolkit::AccessibilityManager::ACCESSIBILITY_HINT, _("IDS_HS_BODY_BUTTON_T_TTS"));
}
}
return aPushButton;
}
-ClusterHome3D::CUtilTextImge CHomeScreenCenterPopup::_CreateButtonLabel(std::string strLabel,int width, int height)
+Dali::Toolkit::TextLabel CHomeScreenCenterPopup::_CreateButtonLabel(std::string strLabel,int width, int height)
{
- ClusterHome3D::CUtilTextImge aTextLabel = ClusterHome3D::CUtilTextImge::New();
-
- int fontSize = CENTER_POPUP_BUTTON_TEXT_NORMAL_FONT_SIZE;
-
- Vector4 textColor = CENTER_POPUP_BUTTON_TEXT_NORMAL_FONT_COLOR;
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
-
- aTextLabel.SetTextSize(width,height);
- aTextLabel.SetTextInfo(fontSize, color, "", false);
- aTextLabel.SetTextName(strLabel,false,false);
- aTextLabel.SetTextAlignment("center","center");
- aTextLabel.CreateImage();
-
- aTextLabel.SetLeaveRequired(true);
+ Dali::Toolkit::TextLabel aTextLabel = Dali::Toolkit::TextLabel::New();
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,CENTER_POPUP_BUTTON_TEXT_NORMAL_FONT_COLOR);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,CENTER_POPUP_BUTTON_TEXT_NORMAL_FONT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strLabel);
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
+ aTextLabel.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"CENTER");
aTextLabel.TouchedSignal().Connect(this, &CHomeScreenCenterPopup::_OnButtonLabelTouched);
-
return aTextLabel;
}
bool CHomeScreenCenterPopup::_OnButtonLabelTouched(Actor actor, const TouchEvent& event)
{
- ClusterHome3D::CUtilTextImge popupText = ClusterHome3D::CUtilTextImge::DownCast(actor);
+ Dali::Toolkit::TextLabel popupText = Dali::Toolkit::TextLabel::DownCast(actor);
if (!popupText)
{
VIEWER_ERR("invalid actor");
void _Finalize();
Dali::Toolkit::PushButton _CreateButton(HomeScreenCenterPopupButtonType eButtonType);
- ClusterHome3D::CUtilTextImge _CreateButtonLabel(std::string strLabel,int width, int height);
+ Dali::Toolkit::TextLabel _CreateButtonLabel(std::string strLabel,int width, int height);
void _OnPan(Actor aActor, const PanGesture& stPan);
void _OnTap(Dali::Actor actor, const Dali::TapGesture& tap);
bool m_bPopupContentScrolling;
Timer m_ScrollBarContractTimer;
- ClusterHome3D::CUtilTextImge m_PopupContentTextImg;
+ Dali::Toolkit::TextLabel m_PopupContentTextImg;
std::string m_strContentText;
ImageActor m_aPopupTitleBg;
Dali::Toolkit::TextLabel m_aPopupTitleText;
- ClusterHome3D::CUtilTextImge mPopupTitleTextImg;
+ Dali::Toolkit::TextLabel mPopupTitleTextImg;
std::string m_strTitleText;
Dali::Toolkit::TextLabel m_aPopupButtonTextRight;
Dali::Toolkit::TextLabel m_aPopupButtonTextCenter;
- ClusterHome3D::CUtilTextImge m_PopupButtonTextLeftImg;
- ClusterHome3D::CUtilTextImge m_PopupButtonTextRightImg;
- ClusterHome3D::CUtilTextImge m_PopupButtonTextCenterImg;
+ Dali::Toolkit::TextLabel m_PopupButtonTextLeftImg;
+ Dali::Toolkit::TextLabel m_PopupButtonTextRightImg;
+ Dali::Toolkit::TextLabel m_PopupButtonTextCenterImg;
ImageActor m_aPopupButtonDivider;
Vector2 CHomeScreenConst::mScreenSize = Vector2(BASE_WIDTH, BASE_HEIGHT);
int CHomeScreenConst::mBaseWidth = 480;
int CHomeScreenConst::mBaseHeight = 800;
+Vector2 CHomeScreenConst::mDpi = Vector2(1, 1);
unsigned int CHomeScreenConst::mScreenResolutionType = CHomeScreenConst::RESOLUTION_BASE_480X800;
// 0 : 480x640 - unsupported
mScreenSize = size;
_SetBaseScreenSize(size.x, size.y);
+
+ Stage stage = Stage::GetCurrent();
+ mDpi = stage.GetDpi();
+}
+
+Vector2 CHomeScreenConst::GetDpi()
+{
+ return mDpi;
}
void CHomeScreenConst::_SetBaseScreenSize(int width, int height)
using namespace Dali;
+#define DALI_TEXT_CONST 72
+#define DALI_DPI CHomeScreenConst::GetDpi()
+
#define BASE_HEIGHT CHomeScreenConst::GetBaseHeight()
#define BASE_WIDTH CHomeScreenConst::GetBaseWidth()
public:
static void SetScreenSize(Vector2 size);
+ static Vector2 GetDpi();
static int GetBaseWidth() { return mBaseWidth; }
static int GetBaseHeight() { return mBaseHeight; }
static float GetScreenWidth() { return mScreenSize.width; }
static unsigned int _GetResolutionType(int x, int y);
static Vector2 mScreenSize;
+ static Vector2 mDpi;
static int mBaseWidth;
static int mBaseHeight;
static unsigned int mScreenResolutionType;
#include <dali/dali.h>
#define HOMESCREEN_BLACK Vector4(0.0f, 0.0f, 0.0f, 1.0f)
+#define HOMESCREEN_WHITE Vector4(1.0f, 1.0f, 1.0f, 1.0f)
//T126
#define MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_COLOR Vector4(0.0f, 0.0f, 0.0f, 1.0f)
#define MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_SIZE Scalable::GetFontSize(30)
//#define CENTER_POPUP_CONTENT_TEXT_FONT_THEME "T123"
-#define CENTER_POPUP_CONTENT_TEXT_FONT_COLOR Vector4(0.0f, 0.0f, 0.0f, 0.1f)
+#define CENTER_POPUP_CONTENT_TEXT_FONT_COLOR Vector4(0.0f, 0.0f, 0.0f, 1.0f)
#define CENTER_POPUP_CONTENT_TEXT_FONT_SIZE Scalable::GetFontSize(30)
//#define CENTER_POPUP_TITLE_TEXT_THEME "T121"
float width = Scalable::GetScreenWidth() - (MORE_POPUP_BUTTON_PADDING_W * 2 + MORE_POPUP_TEXT_PADDING_X * 2);
- // normal text
- ClusterHome3D::CUtilTextImge normalTextImage = ClusterHome3D::CUtilTextImge::New();
- {
- normalTextImage.SetTextSize(width, MORE_POPUP_BUTTON_TEXT_H);
- Vector4 textColor = MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_COLOR;
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
-
- normalTextImage.SetTextInfo(MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_SIZE, color, "", false);
-
- normalTextImage.SetTextName(text, false, false);
- if (isTextAlignRight)
- {
- normalTextImage.SetTextAlignment("center", "right");
- }
- else
- {
- normalTextImage.SetTextAlignment("center", "left");
- }
- normalTextImage.CreateImage();
-
- normalTextImage.SetParentOrigin(ParentOrigin::CENTER_LEFT);
- normalTextImage.SetAnchorPoint(AnchorPoint::CENTER_LEFT);
-
- normalTextImage.SetPosition(MORE_POPUP_TEXT_PADDING_X, 0.0f);
-
- normal.Add(normalTextImage);
- }
+ Dali::Toolkit::TextLabel normalTextImage = Dali::Toolkit::TextLabel::New();
+ normalTextImage.SetSize(width, MORE_POPUP_BUTTON_TEXT_H);
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_COLOR);
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,text);
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
+ if (isTextAlignRight)
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"END");
+ else
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"BEGIN");
+ normalTextImage.SetParentOrigin(ParentOrigin::CENTER_LEFT);
+ normalTextImage.SetAnchorPoint(AnchorPoint::CENTER_LEFT);
+ normalTextImage.SetPosition(MORE_POPUP_TEXT_PADDING_X, 0.0f);
+ normal.Add(normalTextImage);
button.SetButtonImage(normal);
press.Add(pressBg);
- // press text
- ClusterHome3D::CUtilTextImge pressTextImage = ClusterHome3D::CUtilTextImge::New();
- {
- pressTextImage.SetTextSize(width, MORE_POPUP_BUTTON_TEXT_H);
- Vector4 textColor = MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_COLOR;
- char color[7] = {'0'};
- snprintf(color, 7, "%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
- pressTextImage.SetTextInfo(MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_SIZE, color, "", false);
-
- pressTextImage.SetTextName(text, false, false);
- if (isTextAlignRight)
- {
- pressTextImage.SetTextAlignment("center", "right");
- }
- else
- {
- pressTextImage.SetTextAlignment("center", "left");
- }
- pressTextImage.CreateImage();
-
- pressTextImage.SetParentOrigin(ParentOrigin::CENTER_LEFT);
- pressTextImage.SetAnchorPoint(AnchorPoint::CENTER_LEFT);
+ Dali::Toolkit::TextLabel pressTextImage = Dali::Toolkit::TextLabel::New();
+ pressTextImage.SetSize(width, MORE_POPUP_BUTTON_TEXT_H);
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_COLOR);
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,text);
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
+ if (isTextAlignRight)
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"END");
+ else
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"BEGIN");
+ pressTextImage.SetParentOrigin(ParentOrigin::CENTER_LEFT);
+ pressTextImage.SetAnchorPoint(AnchorPoint::CENTER_LEFT);
- pressTextImage.SetPosition(MORE_POPUP_TEXT_PADDING_X, 0.0f);
-
- press.Add(pressTextImage);
- }
+ pressTextImage.SetPosition(MORE_POPUP_TEXT_PADDING_X, 0.0f);
+ press.Add(pressTextImage);
button.SetSelectedImage(press);
void MenuPopup::UpdateButtonText(unsigned int id, std::string text)
{
- ClusterHome3D::CUtilTextImge normalTextImage = mNormalTextMap[id];
+ Dali::Toolkit::TextLabel normalTextImage = mNormalTextMap[id];
if (normalTextImage)
{
- Vector4 textColor = MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_COLOR;
- char color[6] = {'0'};
- snprintf(color, 6, "%2x%2x%2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
- normalTextImage.SetTextInfo(MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_SIZE, color, "", false);
- normalTextImage.SetTextName(text, false, false);
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_COLOR);
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_NORMAL_FONT_THEME_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ normalTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,text);
}
- ClusterHome3D::CUtilTextImge pressTextImage = mNormalTextMap[id];
+ Dali::Toolkit::TextLabel pressTextImage = mNormalTextMap[id];
if (pressTextImage)
{
- Vector4 textColor = MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_COLOR;
- char color[6] = {'0'};
- snprintf(color, 6, "%2x%2x%2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255));
- pressTextImage.SetTextInfo(MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_SIZE, color, "", false);
- pressTextImage.SetTextName(text, false, false);
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_COLOR);
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,MORE_POPUP_BUTTON_TEXT_PRESSED_FONT_THEME_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ pressTextImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,text);
}
-}
+ }
void MenuPopup::Show(void)
{
{
mButtonMaxWidth = 0.f;
- for( std::map<int, ClusterHome3D::CUtilTextImge>::const_iterator it = mNormalTextMap.begin(), endIt = mNormalTextMap.end(); it != endIt; ++it )
+ for( std::map<int, Dali::Toolkit::TextLabel>::const_iterator it = mNormalTextMap.begin(), endIt = mNormalTextMap.end(); it != endIt; ++it )
{
UpdateButtonText( it->first, mTextMap[it->first] );
}
unsigned int mButtonCount;
float mButtonMaxWidth;
std::map<int, Dali::Toolkit::PushButton> mButtonMap;
- std::map<int, ClusterHome3D::CUtilTextImge> mNormalTextMap;
- std::map<int, ClusterHome3D::CUtilTextImge> mPressTextMap;
+ std::map<int, Dali::Toolkit::TextLabel> mNormalTextMap;
+ std::map<int, Dali::Toolkit::TextLabel> mPressTextMap;
std::map<int, std::string> mTextMap;
std::map<int, bool> mDimmedMap;
#include "util-text-image.h"
#include "util-color-image.h"
#include "shader/image-region-effect.h"
+#include "homescreen-theme.h"
+
using namespace ClusterHome3D;
Actor aNameActor = box.GetNameActor();
if(aNameActor)
{
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- aUtilTextImage.SetTextSize(BOX_TEXT_WIDTH, BOX_TEXT_HEIGHT*2);
+ Dali::Toolkit::TextLabel aUtilTextImage = Dali::Toolkit::TextLabel::DownCast(aNameActor);
+ aUtilTextImage.SetSize(BOX_TEXT_WIDTH, BOX_TEXT_HEIGHT*2);
}
- box.SetBoxTextColorByString("FFFFFF","000000");
+ box.SetBoxTextColorByString(HOMESCREEN_WHITE,HOMESCREEN_BLACK);
cMainMenuPage.InsertBoxToPage(box, nPageBoxCount+1, false);
Actor aNameActor = box.GetNameActor();
if(aNameActor)
{
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- aUtilTextImage.SetTextSize(BOX_TEXT_WIDTH, BOX_TEXT_HEIGHT*2);
+ Dali::Toolkit::TextLabel aUtilTextImage = Dali::Toolkit::TextLabel::DownCast(aNameActor);
+ aUtilTextImage.SetSize(BOX_TEXT_WIDTH, BOX_TEXT_HEIGHT*2);
}
- box.SetBoxTextColorByString("FFFFFF","000000");
+ box.SetBoxTextColorByString(HOMESCREEN_WHITE,HOMESCREEN_BLACK);
menuPage.InsertBoxToPage(box, nPageBoxCount+1, false);
}
mMenuBoxContainer.Add(mMenuBoxBaseImage);
}
- mBoxFontColor = "FFFFFF";
- mBoxFontShadowColor = "";
+ mBoxFontColor = HOMESCREEN_WHITE;
+ mBoxFontShadowColor = Vector4( 0.f, 0.0f, 0.0f, 0.0f);
if(!mBoxName.empty())
{
{
if(bIsOnFolder)
{
- m_CUtilTextImge.SetTextSize(BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE*3);
- mBoxFontSize = BOX_TEXT_FONT_SIZE;
- mBoxFontColor = "000000";
- OnSetBoxNameStyle();
+ mBoxFontColor = HOMESCREEN_BLACK;
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,BOX_TEXT_FONT_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImge.SetSize(BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE * 3);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,mBoxFontColor);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,mBoxFontShadowColor);
m_CUtilTextImge.SetPosition(Vector3(BOX_TEXT_GAP_X, BOX_TEXT_GAP_Y, 0.0f));
}
else
{
- m_CUtilTextImge.SetTextSize(EDIT_BOX_TEXT_WIDTH, BOX_TEXT_FONT_SMALL_SIZE*3);
- mBoxFontSize = BOX_TEXT_FONT_SMALL_SIZE;
- OnSetBoxNameStyle();
+ mBoxFontColor = HOMESCREEN_WHITE;
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,BOX_TEXT_FONT_SMALL_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImge.SetSize(EDIT_BOX_TEXT_WIDTH, BOX_TEXT_FONT_SMALL_SIZE * 3);
m_CUtilTextImge.SetPosition(Vector3(EDIT_BOX_TEXT_GAP_X, EDIT_BOX_TEXT_GAP_Y, 0.0f));
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,mBoxFontColor);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,mBoxFontShadowColor);
}
}
if(m_CUtilTextImge)
{
- m_CUtilTextImge.SetTextSize(BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE*3);
+ m_CUtilTextImge.SetSize(BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE * 3);
mBoxFontSize = BOX_TEXT_FONT_SIZE;
if(bIsOnFolder)
{
- mBoxFontColor = "000000";
+ mBoxFontColor = HOMESCREEN_BLACK;
}
else
{
- mBoxFontColor = "FFFFFF";
+ mBoxFontColor = HOMESCREEN_WHITE;
}
OnSetBoxNameStyle();
if (m_CUtilTextImge)
{
- m_CUtilTextImge.SetTextSize(EDIT_BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE*3);
+ m_CUtilTextImge.SetSize(EDIT_BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE*3);
mBoxFontSize = BOX_TEXT_FONT_SMALL_SIZE;
OnSetBoxNameStyle();
m_CUtilTextImge.SetPosition(Vector3(EDIT_BOX_TEXT_GAP_X, EDIT_BOX_TEXT_GAP_Y, 0.0f));
if (m_CUtilTextImge)
{
- m_CUtilTextImge.SetTextSize(BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE*3);
+ m_CUtilTextImge.SetSize(BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE*3);
mBoxFontSize = BOX_TEXT_FONT_SIZE;
OnSetBoxNameStyle();
m_CUtilTextImge.SetPosition(Vector3(BOX_TEXT_GAP_X, BOX_TEXT_GAP_Y, 0.0f));
}
-void CMainMenuBox::SetBoxTextColorByString(const char* strFontColor, const char* strShadowColor)
+void CMainMenuBox::SetBoxTextColorByString(const Vector4 strFontColor, const Vector4 strShadowColor)
{
mBoxFontColor = strFontColor;
mBoxFontShadowColor = strShadowColor;
{
if(!m_CUtilTextImge)
{
- m_CUtilTextImge = ClusterHome3D::CUtilTextImge::New();
- mBoxFontShadowColor = "0000004C";
- if(m_eViewType == APPS_VIEW_MAIN_EDIT)
- {
- m_CUtilTextImge.SetTextSize(EDIT_BOX_TEXT_WIDTH, BOX_TEXT_FONT_SMALL_SIZE*2);
- m_CUtilTextImge.SetTextInfo(BOX_TEXT_FONT_SMALL_SIZE, "FFFFFF", mBoxFontShadowColor, false);
- }
- else
- {
- m_CUtilTextImge.SetTextSize(BOX_TEXT_WIDTH, BOX_TEXT_FONT_SIZE*3);
- m_CUtilTextImge.SetTextInfo(BOX_TEXT_FONT_SIZE, "FFFFFF", mBoxFontShadowColor, false);
- }
-
- m_CUtilTextImge.SetTextName(mBoxName, false, false);
- m_CUtilTextImge.SetTextAlignment("top","center");
- m_CUtilTextImge.SetColorCode(BOX_CODE_NAME_CODE);
- m_CUtilTextImge.SetLineGap(-3);
-
- m_CUtilTextImge.CreateImage();
-
+ m_CUtilTextImge = Toolkit::TextLabel::New();
+ mBoxFontShadowColor = Vector4( 0.0f,0.0f,0.0f, 0.29f );
+ m_CUtilTextImge.SetSize(mBoxFontSize, mBoxFontSize*2);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,mBoxFontSize*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,mBoxFontColor);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,mBoxFontShadowColor);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,mBoxName);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"TOP");
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::MULTI_LINE,true);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"CENTER");
m_CUtilTextImge.SetParentOrigin(ParentOrigin::TOP_CENTER);
m_CUtilTextImge.SetAnchorPoint(AnchorPoint::TOP_CENTER);
{
m_CUtilTextImge.SetPosition(Vector3(BOX_TEXT_GAP_X, BOX_TEXT_GAP_Y, 0.0f));
}
-/*
- Actor testActor = Dali::Toolkit::CreateSolidColorActor(Vector4(1.0f, 0.0f, 0.0f, 0.4f));
- testActor.SetParentOrigin(ParentOrigin::CENTER);
- testActor.SetAnchorPoint(AnchorPoint::CENTER);
- testActor.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, ParentSource( Actor::Property::SIZE ), EqualToConstraint() ) );
- m_CUtilTextImge.Add(testActor);
-*/
-// if(mMenuBoxBaseImage)
-// mMenuBoxBaseImage.Add(m_CUtilTextImge);
mMenuBoxContainer.Add(m_CUtilTextImge);
}
else
{
- m_CUtilTextImge.SetTextName(mBoxName, false, false);
- m_CUtilTextImge.SetTextInfo(mBoxFontSize, mBoxFontColor, mBoxFontShadowColor, false);
- m_CUtilTextImge.SetColorCode(BOX_CODE_NAME_CODE);
- m_CUtilTextImge.ReCreateImage();
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,mBoxName);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,mBoxFontSize*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,mBoxFontColor);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,mBoxFontShadowColor);
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"TOP");
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"CENTER");
+ m_CUtilTextImge.SetProperty( Dali::Toolkit::TextLabel::Property::MULTI_LINE,true);
}
}
float mBoxPage; ///< box page
Vector3 mBoxPosition; ///< box position info
Vector4 mBoxNameColor;
- const char* mBoxFontColor;
- const char* mBoxFontShadowColor;
+ Vector4 mBoxFontColor;
+ Vector4 mBoxFontShadowColor;
int mBoxFontSize;
std::string mBoxName; ///< box name
ResourceImage mMenuBoxBaseImageData;
Actor mMenuBoxContainer; ///< container actor that has base image and shadow image or text..
- ClusterHome3D::CUtilTextImge m_CUtilTextImge;
+ Dali::Toolkit::TextLabel m_CUtilTextImge;
PageSwitchedDirection mSwitchedDirection;
Timer mPageSwitchTimer;
void SetTouchSensitive(bool bTouchSensitive);
void ChangeBoxRatio(float ratio);
void SetBoxTextColor(Vector4 color);
- void SetBoxTextColorByString(const char* strFontColor, const char* strShadowColor);
+ void SetBoxTextColorByString(const Vector4 strFontColor, const Vector4 strShadowColor);
void UpdateBoxData(BoxDataPtr boxData);
void UpdateScreenPostion(Vector3 boxPos, Vector3 pressedPos);
GetImpl(*this).SetBoxTextColor(color);
}
-void CMainMenuBox::SetBoxTextColorByString(const char* strFontColor, const char* strShadowColor)
+void CMainMenuBox::SetBoxTextColorByString(const Vector4 strFontColor, const Vector4 strShadowColor)
{
GetImpl(*this).SetBoxTextColorByString(strFontColor, strShadowColor);
}
void DoBoxAddAnimation();
void ChangeBoxRatio(float ratio);
void SetBoxTextColor(Vector4 color);
- void SetBoxTextColorByString(const char* strFontColor, const char* strShadowColor);
+ void SetBoxTextColorByString(const Vector4 strFontColor, const Vector4 strShadowColor);
void UpdateBoxData(BoxDataPtr boxData);
void UpdateScreenPostion(Vector3 boxPos, Vector3 pressedPos);
Actor aNameActor = menuBox.GetNameActor();
if(aNameActor)
{
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- aUtilTextImage.SetTextSize(BOX_TEXT_WIDTH, BOX_TEXT_HEIGHT*2);
+ Dali::Toolkit::TextLabel aUtilTextImage = Dali::Toolkit::TextLabel::DownCast(aNameActor);
+ aUtilTextImage.SetSize(BOX_TEXT_WIDTH, BOX_TEXT_HEIGHT*2);
}
- menuBox.SetBoxTextColorByString("F5F5F5","000000");
+ menuBox.SetBoxTextColorByString(Vector4(0.95f,0.95f,0.95f,1.0f) ,HOMESCREEN_BLACK);
//remove virtual box
if (m_pVirtualBoxData)
boxData->SetPageId(pageId);
boxData->SetMenuId(mBoxData->GetBoxId());
- Vector4 vColor(FOLDER_CODE_ICON_NAME_COLOR);
-
- char sTextColor[10] = { 0, };
- snprintf(sTextColor, sizeof(sTextColor), "%02X%02X%02X%02X", (unsigned int)(vColor.x*255), (unsigned int)(vColor.y*255), (unsigned int)(vColor.z*255), (unsigned int)(vColor.w*255));
- menuBox.SetBoxTextColorByString(sTextColor,NULL);
+ menuBox.SetBoxTextColorByString(FOLDER_CODE_ICON_NAME_COLOR,Vector4( 0.0f,0.0f,0.0f,0.0f));
m_bPageSwitching = false;
_SetBoxPositionConstraints(newBox, _GetBoxOrderByGridPosition(boxGridPos));
- Vector4 vColor = Color::BLACK;
-
- char sTextColor[10] = { 0, };
- snprintf(sTextColor, sizeof(sTextColor), "%02X%02X%02X%02X", (unsigned int)(vColor.x*255), (unsigned int)(vColor.y*255), (unsigned int)(vColor.z*255), (unsigned int)(vColor.w*255));
-
- Actor aNameActor = newBox.GetNameActor();
- if(aNameActor)
- {
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- }
- newBox.SetBoxTextColorByString(sTextColor, NULL);
+ newBox.SetBoxTextColorByString(Color::BLACK, Vector4( 0.0f, 0.0f, 0.0f, 0.0f));
//Focus
newBox.SetKeyboardFocusable(true);
_SetBoxPositionConstraints(box, _GetBoxOrderByGridPosition(boxGridPos));
- Vector4 vColor = Color::BLACK;
-
- char sTextColor[10] = { 0, };
- snprintf(sTextColor, sizeof(sTextColor), "%02X%02X%02X%02X", (unsigned int)(vColor.x*255), (unsigned int)(vColor.y*255), (unsigned int)(vColor.z*255), (unsigned int)(vColor.w*255));
-
- Actor aNameActor = box.GetNameActor();
- if(aNameActor)
- {
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- }
- box.SetBoxTextColorByString(sTextColor, NULL);
+ box.SetBoxTextColorByString(Color::BLACK, Vector4( 0.0f, 0.0f,0.0f, 0.0f));
//Focus
box.SetKeyboardFocusable(true);
newBox.SetParentOrigin(ParentOrigin::TOP_CENTER);
newBox.SetAnchorPoint(AnchorPoint::TOP_CENTER);
newBox.SetSize( FOLDER_BOX_WIDTH, FOLDER_BOX_HEIGHT );
-
- Vector4 vColor = Color::BLACK;
-
- char sTextColor[10] = { 0, };
- snprintf(sTextColor, sizeof(sTextColor), "%02X%02X%02X%02X", (unsigned int)(vColor.x*255), (unsigned int)(vColor.y*255), (unsigned int)(vColor.z*255), (unsigned int)(vColor.w*255));
-
- Actor aNameActor = newBox.GetNameActor();
- if(aNameActor)
- {
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- }
- newBox.SetBoxTextColorByString(sTextColor, NULL);
+ newBox.SetBoxTextColorByString(Color::BLACK, Vector4( 0.0f, 0.0f, 0.0f, 0.0f ));
_PullBoxesFromPosition( _GetBoxOrderByGridPosition(boxGridPos) );
menuBox.SetAnchorPoint(AnchorPoint::TOP_CENTER);
menuBox.SetSize( FOLDER_BOX_WIDTH, FOLDER_BOX_HEIGHT );
- Vector4 vColor = Color::BLACK;
-
- char sTextColor[10] = { 0, };
- snprintf(sTextColor, sizeof(sTextColor), "%02X%02X%02X%02X", (unsigned int)(vColor.x*255), (unsigned int)(vColor.y*255), (unsigned int)(vColor.z*255), (unsigned int)(vColor.w*255));
-
- Actor aNameActor = menuBox.GetNameActor();
- if(aNameActor)
- {
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- }
- menuBox.SetBoxTextColorByString(sTextColor, NULL);
+ menuBox.SetBoxTextColorByString(Color::BLACK, Vector4( 0.0f, 0.0f, 0.0f, 0.0f ));
Vector3 boxGridPos(0.0f, 0.0f,0.0f) ;
boxGridPos = _GetBoxGridPositionByOrder(order);
menuBox.SetSize(FOLDER_BOX_WIDTH, FOLDER_BOX_HEIGHT);
menuBox.SetBoxEditMode(m_eViewType, true);
- Vector4 vColor = Color::BLACK;
-
- char sTextColor[10] = { 0, };
- snprintf(sTextColor, sizeof(sTextColor), "%02X%02X%02X%02X", (unsigned int)(vColor.x*255), (unsigned int)(vColor.y*255), (unsigned int)(vColor.z*255), (unsigned int)(vColor.w*255));
-
- Actor aNameActor = menuBox.GetNameActor();
- if(aNameActor)
- {
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- }
- menuBox.SetBoxTextColorByString(sTextColor, NULL);
+ menuBox.SetBoxTextColorByString(Color::BLACK, Vector4( 0.0f, 0.0f, 0.0f, 0.0f ));
//Focus
menuBox.SetKeyboardFocusable(true);
if(menuBoxData->GetBoxId() == boxData->GetBoxId())
{
tBox.UpdateBoxData(boxData);
-
- Vector4 vColor = Color::BLACK;
-
- char sTextColor[10] = { 0, };
- snprintf(sTextColor, sizeof(sTextColor), "%02X%02X%02X%02X", (unsigned int)(vColor.x*255), (unsigned int)(vColor.y*255), (unsigned int)(vColor.z*255), (unsigned int)(vColor.w*255));
-
- Actor aNameActor = tBox.GetNameActor();
- if(aNameActor)
- {
- ClusterHome3D::CUtilTextImge aUtilTextImage = ClusterHome3D::CUtilTextImge::DownCast(aNameActor);
- }
- tBox.SetBoxTextColorByString(sTextColor, NULL);
+ tBox.SetBoxTextColorByString(Color::BLACK, Vector4( 0.0f, 0.0f, 0.0f, 0.0f ));
break;
}
pkgmgrinfo_appinfo_h app_handle = NULL;
uid_t uid = getuid();
int ret = pkgmgrinfo_appinfo_get_usr_appinfo(appId.c_str(), uid, &app_handle);
-
+
+ HOME_ERR("pkgmgrinfo_appinfo_get_usr_appinfo return [%s][[%d]",appId.c_str(), ret);
if (PMINFO_R_OK != ret) {
- HOME_ERR("pkgmgrinfo_pkginfo_get_usr_pkginfo return [%d]", ret);
+ HOME_ERR("pkgmgrinfo_appinfo_get_usr_appinfo return [%d]", ret);
return false;
}
self.Add(m_ViewTitleBg);
// title
- m_CUtilTextImgTitle = ClusterHome3D::CUtilTextImge::New();
- m_CUtilTextImgTitle.SetTextSize(VIEW_MANAGER_TITLE_TEXT_WIDTH, VIEW_MANAGER_TITLE_TEXT_HEIGHT);
+ m_CUtilTextImgTitle = Dali::Toolkit::TextLabel::New();
+ m_CUtilTextImgTitle.SetSize(VIEW_MANAGER_TITLE_TEXT_WIDTH, VIEW_MANAGER_TITLE_TEXT_HEIGHT);
m_CUtilTextImgTitle.SetParentOrigin(ParentOrigin::CENTER);
m_CUtilTextImgTitle.SetAnchorPoint(AnchorPoint::CENTER);
- m_CUtilTextImgTitle.SetSize(VIEW_MANAGER_TITLE_ICON_WIDTH, VIEW_MANAGER_TITLE_ICON_HEIGHT);
- m_CUtilTextImgTitle.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
m_ViewTitleBg.Add(m_CUtilTextImgTitle);
{
if(!m_TitleLeftNormalTextImg)
{
- m_TitleLeftNormalTextImg = CreateTitleButtonText(TITLE_CANCEL_BUTTON_TEXT_THEME_COLOR, TITLE_CANCEL_BUTTON_TEXT_THEME_SIZE ,TITLE_CANCEL_BUTTON_TEXT_THEME_NAME,TITLE_CANCEL_TEXT,"left", "");
+ m_TitleLeftNormalTextImg = CreateTitleButtonText(TITLE_CANCEL_BUTTON_TEXT_THEME_COLOR, TITLE_CANCEL_BUTTON_TEXT_THEME_SIZE ,TITLE_CANCEL_BUTTON_TEXT_THEME_NAME,TITLE_CANCEL_TEXT,"BEGIN", "");
}
else
{
}
if(!m_TitleLeftPressTextImg)
{
- m_TitleLeftPressTextImg = CreateTitleButtonText(TITLE_CANCEL_BUTTON_PRESS_TEXT_THEME_COLOR, TITLE_CANCEL_BUTTON_PRESS_TEXT_THEME_SIZE, TITLE_CANCEL_BUTTON_PRESS_TEXT_THEME_NAME,TITLE_CANCEL_TEXT,"left", "");
+ m_TitleLeftPressTextImg = CreateTitleButtonText(TITLE_CANCEL_BUTTON_PRESS_TEXT_THEME_COLOR, TITLE_CANCEL_BUTTON_PRESS_TEXT_THEME_SIZE, TITLE_CANCEL_BUTTON_PRESS_TEXT_THEME_NAME,TITLE_CANCEL_TEXT,"BEGIN", "");
}
else
{
}
if(!m_TitleLeftDimmedTextImg)
{
- m_TitleLeftDimmedTextImg = CreateTitleButtonText(TITLE_CANCEL_BUTTON_DIMMED_TEXT_THEME_COLOR,TITLE_CANCEL_BUTTON_DIMMED_TEXT_THEME_SIZE, TITLE_CANCEL_BUTTON_DIMMED_TEXT_THEME_NAME,TITLE_CANCEL_TEXT,"left", "");
+ m_TitleLeftDimmedTextImg = CreateTitleButtonText(TITLE_CANCEL_BUTTON_DIMMED_TEXT_THEME_COLOR,TITLE_CANCEL_BUTTON_DIMMED_TEXT_THEME_SIZE, TITLE_CANCEL_BUTTON_DIMMED_TEXT_THEME_NAME,TITLE_CANCEL_TEXT,"BEGIN", "");
}
else
{
{
if(!m_TitleRightNormalTextImg)
{
- m_TitleRightNormalTextImg = CreateTitleButtonText(TITLE_DONE_BUTTON_TEXT_THEME_COLOR, TITLE_DONE_BUTTON_TEXT_THEME_SIZE, TITLE_DONE_BUTTON_TEXT_THEME_NAME,TITLE_DONE_TEXT,"right", "");
+ m_TitleRightNormalTextImg = CreateTitleButtonText(TITLE_DONE_BUTTON_TEXT_THEME_COLOR, TITLE_DONE_BUTTON_TEXT_THEME_SIZE, TITLE_DONE_BUTTON_TEXT_THEME_NAME,TITLE_DONE_TEXT,"END", "");
}
else
{
if(!m_TitleRightPressTextImg)
{
- m_TitleRightPressTextImg = CreateTitleButtonText(TITLE_DONE_BUTTON_PRESS_TEXT_THEME_COLOR,TITLE_DONE_BUTTON_PRESS_TEXT_THEME_SIZE, TITLE_DONE_BUTTON_PRESS_TEXT_THEME_NAME,TITLE_DONE_TEXT,"right", "");
+ m_TitleRightPressTextImg = CreateTitleButtonText(TITLE_DONE_BUTTON_PRESS_TEXT_THEME_COLOR,TITLE_DONE_BUTTON_PRESS_TEXT_THEME_SIZE, TITLE_DONE_BUTTON_PRESS_TEXT_THEME_NAME,TITLE_DONE_TEXT,"END", "");
}
else
{
if(!m_TitleRightDimmedTextImg)
{
- m_TitleRightDimmedTextImg = CreateTitleButtonText(TITLE_DONE_BUTTON_DIMMED_TEXT_THEME_COLOR, TITLE_DONE_BUTTON_DIMMED_TEXT_THEME_SIZE, TITLE_DONE_BUTTON_DIMMED_TEXT_THEME_NAME,TITLE_DONE_TEXT,"right", "");
+ m_TitleRightDimmedTextImg = CreateTitleButtonText(TITLE_DONE_BUTTON_DIMMED_TEXT_THEME_COLOR, TITLE_DONE_BUTTON_DIMMED_TEXT_THEME_SIZE, TITLE_DONE_BUTTON_DIMMED_TEXT_THEME_NAME,TITLE_DONE_TEXT,"END", "");
}
else
{
}
-ClusterHome3D::CUtilTextImge CMainMenuViewManager::CreateTitleButtonText(const Vector4 font_color, const unsigned int size ,const char* font_name, const char* textStr, const char* horizonDir, const char* shadowStr)
+Dali::Toolkit::TextLabel CMainMenuViewManager::CreateTitleButtonText(const Vector4 font_color, const unsigned int size ,const char* font_name, const char* textStr, const char* horizonDir, const char* shadowStr)
{
- ClusterHome3D::CUtilTextImge buttonText = ClusterHome3D::CUtilTextImge::New();
- buttonText.SetTextSize(VIEW_MANAGER_TITLE_ICON_WIDTH-Scalable::GetX(30) , VIEW_MANAGER_TITLE_ICON_HEIGHT);
+ Dali::Toolkit::TextLabel buttonText = Dali::Toolkit::TextLabel::New();
+ buttonText.SetSize(VIEW_MANAGER_TITLE_ICON_WIDTH-Scalable::GetX(30) , VIEW_MANAGER_TITLE_ICON_HEIGHT);
- char color[10] = {'0'};
- snprintf(color, sizeof(color), "%.2x%.2x%.2x%.2x", (unsigned int)(font_color.r*255), (unsigned int)(font_color.g*255), (unsigned int)(font_color.b*255), (unsigned int)(font_color.a*255));
-
- buttonText.SetTextInfo(size, color, shadowStr, false);
- buttonText.SetTextName(textStr,false,false);
- buttonText.SetTextAlignment("center",horizonDir);
-
- buttonText.SetFontType( font_name );
-
- buttonText.CreateImage();
+ buttonText.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,size*DALI_TEXT_CONST/DALI_DPI.y);
+ buttonText.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,font_color);
+ buttonText.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,textStr);
+ buttonText.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,horizonDir);
+ buttonText.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
buttonText.SetParentOrigin(ParentOrigin::CENTER);
buttonText.SetAnchorPoint(AnchorPoint::CENTER);
}
-void CMainMenuViewManager::UpdateTitleButtonText(ClusterHome3D::CUtilTextImge textImage,const Vector4 font_color, const unsigned int size ,const char* font_name,const char* textStr, const char* shadowStr)
+void CMainMenuViewManager::UpdateTitleButtonText(Dali::Toolkit::TextLabel textImage,const Vector4 font_color, const unsigned int size ,const char* font_name,const char* textStr, const char* shadowStr)
{
- char color[10] = {'0'};
- snprintf(color, sizeof(color), "%.2x%.2x%.2x%.2x", (unsigned int)(font_color.r*255), (unsigned int)(font_color.g*255), (unsigned int)(font_color.b*255), (unsigned int)(font_color.a*255));
-
- textImage.SetTextInfo(size, color, shadowStr, false);
- textImage.SetTextName(textStr,false,false);
- textImage.ReCreateImage();
-
+ textImage.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,size*DALI_TEXT_CONST/DALI_DPI.y);
+ textImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,font_color);
+ textImage.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,textStr);
}
{
if (m_CUtilTextImgTitle)
{
-
- int fontSize = TITLE_CONTENT_TEXT_THEME_SIZE;
- Vector4 textColor = TITLE_CONTENT_TEXT_THEME_COLOR;
- char color[10] = {'0'};
- snprintf(color, sizeof(color), "%.2x%.2x%.2x%.2x", (unsigned int)(textColor.r*255), (unsigned int)(textColor.g*255), (unsigned int)(textColor.b*255), (unsigned int)(textColor.a*255));
- m_CUtilTextImgTitle.SetTextInfo(fontSize, color, "000000BF", false);
- m_CUtilTextImgTitle.SetTextName(strTitle,false,false);
- m_CUtilTextImgTitle.SetTextAlignment("center","center");
- m_CUtilTextImgTitle.CreateImage();
-
+ m_CUtilTextImgTitle.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE,TITLE_CONTENT_TEXT_THEME_SIZE*DALI_TEXT_CONST/DALI_DPI.y);
+ m_CUtilTextImgTitle.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT_COLOR,TITLE_CONTENT_TEXT_THEME_COLOR);
+ m_CUtilTextImgTitle.SetProperty( Dali::Toolkit::TextLabel::Property::SHADOW_COLOR,Vector4( 0.0f, 0.0f, 0.0f, 0.74f ));
+ m_CUtilTextImgTitle.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT,strTitle);
+ m_CUtilTextImgTitle.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,"CENTER");
+ m_CUtilTextImgTitle.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,"CENTER");
}
}
if (m_CUtilTextImgTitle)
{
float fWidth = (VIEW_MANAGER_TITLE_TEXT_WIDTH + VIEW_MANAGER_TITLE_ICON_WIDTH + VIEW_MANAGER_TITLE_GAP_X * 2);
- m_CUtilTextImgTitle.SetTextSize(fWidth, VIEW_MANAGER_TITLE_TEXT_HEIGHT);
+ m_CUtilTextImgTitle.SetSize(fWidth, VIEW_MANAGER_TITLE_TEXT_HEIGHT);
}
}
else if (nType == TITLE_BUTTON_TYPE_ICON)
if (m_CUtilTextImgTitle)
{
float fWidth = VIEW_MANAGER_TITLE_TEXT_WIDTH;
- m_CUtilTextImgTitle.SetTextSize(fWidth, VIEW_MANAGER_TITLE_TEXT_HEIGHT);
+ m_CUtilTextImgTitle.SetSize(fWidth, VIEW_MANAGER_TITLE_TEXT_HEIGHT);
}
}
else if (nType == TITLE_BUTTON_TYPE_TEXT)
if (m_CUtilTextImgTitle)
{
focusManager.SetFocusOrder(m_CUtilTextImgTitle, BASE_FOCUS_ORDER_TITLE);
- focusManager.SetAccessibilityAttribute(m_CUtilTextImgTitle, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_CUtilTextImgTitle.GetText());
+ focusManager.SetAccessibilityAttribute(m_CUtilTextImgTitle, Toolkit::AccessibilityManager::ACCESSIBILITY_LABEL, m_CUtilTextImgTitle.GetProperty<std::string>( Toolkit::TextLabel::Property::TEXT ));
focusManager.SetAccessibilityAttribute(m_CUtilTextImgTitle, Toolkit::AccessibilityManager::ACCESSIBILITY_TRAIT, _("IDS_COM_HEADER_TITLE"));
if (nFocusUpdateType == FOCUS_UPDATE_TYPE_RESET)
{
char sBuf[1024] = { 0, };
- snprintf(sBuf, sizeof(sBuf), "%s, %s", _("IDS_ST_HEADER_APPLICATIONS"), m_CUtilTextImgTitle.GetText().c_str());
+ snprintf(sBuf, sizeof(sBuf), "%s, %s", _("IDS_ST_HEADER_APPLICATIONS"), m_CUtilTextImgTitle.GetProperty<std::string>( Toolkit::TextLabel::Property::TEXT ).c_str());
cHomeAccessibility->Speak(sBuf);
}
}
// title
Actor m_ViewTitleBg;
- ClusterHome3D::CUtilTextImge m_CUtilTextImgTitle;
+ Dali::Toolkit::TextLabel m_CUtilTextImgTitle;
Dali::Toolkit::PushButton m_aTitleLeftButton;
Dali::Toolkit::PushButton m_aTitleRightButton;
- ClusterHome3D::CUtilTextImge m_TitleLeftNormalTextImg;
- ClusterHome3D::CUtilTextImge m_TitleLeftPressTextImg;
- ClusterHome3D::CUtilTextImge m_TitleLeftDimmedTextImg;
+ Dali::Toolkit::TextLabel m_TitleLeftNormalTextImg;
+ Dali::Toolkit::TextLabel m_TitleLeftPressTextImg;
+ Dali::Toolkit::TextLabel m_TitleLeftDimmedTextImg;
- ClusterHome3D::CUtilTextImge m_TitleRightNormalTextImg;
- ClusterHome3D::CUtilTextImge m_TitleRightPressTextImg;
- ClusterHome3D::CUtilTextImge m_TitleRightDimmedTextImg;
+ Dali::Toolkit::TextLabel m_TitleRightNormalTextImg;
+ Dali::Toolkit::TextLabel m_TitleRightPressTextImg;
+ Dali::Toolkit::TextLabel m_TitleRightDimmedTextImg;
/*
* box management
void _OnPageIndicatorButtonClicked(CHomeScreenPageIndicator::HomeScreenButtonType type);
- ClusterHome3D::CUtilTextImge CreateTitleButtonText(const Vector4 color, const unsigned int size ,const char* font_name,const char* textStr, const char* horizonDir, const char* shadowStr);
- void UpdateTitleButtonText(ClusterHome3D::CUtilTextImge textImage,const Vector4 font_color, const unsigned int size ,const char* font_name,const char* textStr, const char* shadowStr);
+ Dali::Toolkit::TextLabel CreateTitleButtonText(const Vector4 color, const unsigned int size ,const char* font_name,const char* textStr, const char* horizonDir, const char* shadowStr);
+ void UpdateTitleButtonText(Dali::Toolkit::TextLabel textImage,const Vector4 font_color, const unsigned int size ,const char* font_name,const char* textStr, const char* shadowStr);
bool HideAllCenterPopup();
bool DestroyAllCenterPopup();