fix error log
authorMyung Jin Kim <critical.kim@samsung.com>
Tue, 19 Mar 2013 13:09:51 +0000 (22:09 +0900)
committerMyung Jin Kim <critical.kim@samsung.com>
Tue, 19 Mar 2013 13:09:51 +0000 (22:09 +0900)
Change-Id: I62bfb58b9a1c21f59f19a1c6d3b0ce1d683e0df8

src/ui/controls/FUiCtrl_FooterImpl.cpp
src/ui/controls/FUiCtrl_HeaderImpl.cpp
src/ui/controls/FUiCtrl_Toolbar.cpp
src/ui/controls/FUiCtrl_ToolbarPresenter.cpp

index 2bd5cd3..e0ac250 100644 (file)
@@ -465,7 +465,7 @@ _FooterImpl::SetBackButton(void)
        GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetCore().GetOrientation(), buttonWidth);
        GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize);
 
-       pButton->SetSize(FloatDimension(buttonWidth, buttonHeight));
+       pButton->SetBounds(FloatRectangle(0.0f, 0.0f, buttonWidth, buttonHeight));
 
        Bitmap* pBackgroundNormalBitmap = null;
        Bitmap* pBackgroundPressedBitmap = null;
@@ -918,7 +918,7 @@ _FooterImpl::ConvertButtonItem(const ButtonItem& buttonItem)
        GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_HEIGHT, GetCore().GetOrientation(), buttonItemHeight);
 
        pButton->SetMargin(0.0f, 0.0f, 0.0f, 0.0f);
-       pButton->SetSize(FloatDimension(buttonItemWidth, buttonItemHeight));
+       pButton->SetBounds(FloatRectangle(0.0f, 0.0f, buttonItemWidth, buttonItemHeight));
 
        pButton->SetActionId(buttonItem.GetActionId());
 
@@ -1078,9 +1078,9 @@ _FooterImpl::ConvertFooterItem(const FooterItem& footerItem)
 
        float minItemLength = 0.0f;
 
-       GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_WIDTH_1_MIN, GetCore().GetOrientation(), minItemLength);
+       GET_SHAPE_CONFIG(FOOTER::ITEM_MINIMUM_WIDTH, GetCore().GetOrientation(), minItemLength);
 
-       pButton->SetSize(FloatDimension(minItemLength, minItemLength));
+       pButton->SetBounds(FloatRectangle(0.0f, 0.0f, minItemLength, minItemLength));
 
        pButton->SetActionId(footerItem.GetActionId());
 
index 6bd0a35..dc5ff31 100644 (file)
@@ -844,7 +844,7 @@ _HeaderImpl::SetBackButton(void)
        GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetCore().GetOrientation(), buttonWidth);
        GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize);
 
-       pButton->SetSize(FloatDimension(buttonWidth, buttonHeight));
+       pButton->SetBounds(FloatRectangle(0.0f, 0.0f, buttonWidth, buttonHeight));
 
        Bitmap* pBackgroundNormalBitmap = null;
        Bitmap* pBackgroundPressedBitmap = null;
@@ -1214,7 +1214,7 @@ _HeaderImpl::ConvertButtonItem(const ButtonItem& buttonItem)
        }
 
        pButton->SetMargin(0.0f, 0.0f, 0.0f, 0.0f);
-       pButton->SetSize(FloatDimension(buttonItemWidth, buttonItemHeight));
+       pButton->SetBounds(FloatRectangle(0.0f, 0.0f, buttonItemWidth, buttonItemHeight));
 
        pButton->SetActionId(buttonItem.GetActionId());
 
@@ -1400,9 +1400,9 @@ _HeaderImpl::ConvertHeaderItem(const HeaderItem& headerItem)
 
        float minItemLength = 0.0f;
 
-       GET_SHAPE_CONFIG(HEADER::HEADER_ITEM_WIDTH_1_MIN, GetCore().GetOrientation(), minItemLength);
+       GET_SHAPE_CONFIG(HEADER::ITEM_MINIMUM_WIDTH, GetCore().GetOrientation(), minItemLength);
 
-       pButton->SetSize(FloatDimension(minItemLength, minItemLength));
+       pButton->SetBounds(FloatRectangle(0.0f, 0.0f, minItemLength, minItemLength));
 
        pButton->SetActionId(headerItem.GetActionId());
 
index 83f8c64..c290794 100644 (file)
@@ -1852,14 +1852,8 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number)
                bounds.y = bounds.y + topTouchMargin;
                bounds.width = bounds.width - rightTouchMargin;
 
-               // SetButtonNumberedBadgeIcon
-
-               Integer tempNumber(number);
-
                if (existingBadgeIcon)
                {
-                       existingBadgeIcon->SetText(tempNumber.ToString());
-
                        float fontSize = 0.0f;
                        float height = 0.0f;
                        float width = 0.0f;
@@ -1892,8 +1886,11 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number)
                                GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
                        }
 
-                       existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
                        existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, bounds.y, width, height));
+                       existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
+
+                       Integer tempNumber(number);
+                       existingBadgeIcon->SetText(tempNumber.ToString());
                }
        }
 
@@ -2209,12 +2206,8 @@ _Toolbar::SetItemNumberedBadgeIcon(int itemIndex, int number)
 
                FloatRectangle bounds = __pItems.at(itemIndex)->GetBoundsF();
 
-               Integer tempNumber(number);
-
                if (existingBadgeIcon)
                {
-                       existingBadgeIcon->SetText(tempNumber.ToString());
-
                        float fontSize = 0.0f;
                        float height = 0.0f;
                        float width = 0.0f;
@@ -2222,8 +2215,6 @@ _Toolbar::SetItemNumberedBadgeIcon(int itemIndex, int number)
                        GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize);
                        GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height);
 
-                       existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
-
                        if (number < 10)
                        {
                                GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width);
@@ -2246,6 +2237,10 @@ _Toolbar::SetItemNumberedBadgeIcon(int itemIndex, int number)
                        }
 
                        existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0.0f, width, height));
+                       existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
+
+                       Integer tempNumber(number);
+                       existingBadgeIcon->SetText(tempNumber.ToString());
                }
        }
 
@@ -5927,12 +5922,6 @@ _Toolbar::SetTitleNumberedBadgeIcon(int number)
                __pTitleBadgeIcon->SetTextColor(badgeIconTextColor);
                __pTitleBadgeIcon->SetMargin(0, 10);
 
-               // SetTitleNumberedBadgeIcon
-
-               Integer tempNumber(number);
-
-               __pTitleBadgeIcon->SetText(tempNumber.ToString());
-
                float fontSize = 0.0f;
                float height = 0.0f;
                float width = 0.0f;
@@ -5940,8 +5929,6 @@ _Toolbar::SetTitleNumberedBadgeIcon(int number)
                GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize);
                GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height);
 
-               __pTitleBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
-
                if (number < 10)
                {
                        GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width);
@@ -5964,6 +5951,10 @@ _Toolbar::SetTitleNumberedBadgeIcon(int number)
                }
 
                __pTitleBadgeIcon->SetBounds(FloatRectangle(0.0f, 0.0f, width, height));
+               __pTitleBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
+
+               Integer tempNumber(number);
+               __pTitleBadgeIcon->SetText(tempNumber.ToString());
 
                AttachChild(*__pTitleBadgeIcon);
                SetChildAlwaysOnTop(*__pTitleBadgeIcon);
index 68a5ac3..52d46f2 100644 (file)
@@ -265,8 +265,7 @@ _ToolbarPresenter::Draw(void)
        GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, __pToolbar->GetOrientation(), footerButtonItemWidth);
        GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_HEIGHT, __pToolbar->GetOrientation(), footerButtonItemHeight);
 
-       if ((style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE
-                       || style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TEXT))
+       if (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE)
        {
                if (__pTitleBackgroundBitmap)
                {
@@ -783,7 +782,6 @@ _ToolbarPresenter::DrawItems(void)
 
                __titleRect.height = _FontImpl::GetInstance(*__pTitleTextFont)->GetLeading();
 
-
                if (pTitleIcon)
                {
                        pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth));
@@ -806,7 +804,7 @@ _ToolbarPresenter::DrawItems(void)
 
                if (totalWidth > usableArea.width)
                {
-                       __titleRect.width = titleTextDimension.width - (totalWidth - usableArea.width);;
+                       __titleRect.width = titleTextDimension.width - (totalWidth - usableArea.width);
 
                        if (pTitleIcon)
                        {