fix jira defect and modify divider gap
authorMyung Jin Kim <critical.kim@samsung.com>
Fri, 26 Jul 2013 09:15:32 +0000 (18:15 +0900)
committerMyung Jin Kim <critical.kim@samsung.com>
Fri, 26 Jul 2013 09:15:32 +0000 (18:15 +0900)
Change-Id: Ie437f016dc0cf141956f2fada6b899a084880507

src/ui/controls/FUiCtrl_Button.cpp
src/ui/controls/FUiCtrl_ButtonImpl.cpp
src/ui/controls/FUiCtrl_ButtonPresenter.cpp
src/ui/controls/FUiCtrl_Toolbar.cpp
src/ui/controls/FUiCtrl_ToolbarPresenter.cpp
src/ui/inc/FUi_ResourceHeaderConfig.h
src/ui/resource/FUi_ResourceHeaderConfig.cpp

index 3b904a6..8a278f6 100644 (file)
@@ -1296,7 +1296,14 @@ _Button::SetButtonStatus(_ButtonStatus buttonStatus, bool fire)
 _ButtonStatus
 _Button::GetButtonStatus(void) const
 {
-       return __buttonStatus;
+       if (IsEnabled())
+       {
+               return __buttonStatus;
+       }
+       else
+       {
+               return _BUTTON_STATUS_DISABLED;
+       }
 }
 
 result
index 6c881ff..2c85ab9 100644 (file)
@@ -517,7 +517,7 @@ _ButtonImpl::OnActionPerformed(const _Control& source, int actionId)
 result
 _ButtonImpl::OnAttachedToMainTree(void)
 {
-       SetFocusable(true);
+       //SetFocusable(true); // for TDIS-6998
 
        _ControlImpl::OnAttachedToMainTree();
 
index a375d82..7403616 100644 (file)
@@ -1198,12 +1198,10 @@ _ButtonPresenter::OnAncestorEnableStateChanged(const _Control& control)
        if (__pButton->GetEnableState())
        {
                __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
-               __pButton->Invalidate();
        }
        else
        {
                __pButton->SetButtonStatus(_BUTTON_STATUS_DISABLED);
-               __pButton->Invalidate();
        }
 
        return;
index ca0b26e..6bb5e2f 100644 (file)
@@ -1840,7 +1840,6 @@ _Toolbar::SetButtonBadgeIcon(ToolbarButton position, const Bitmap* pBadgeIcon)
        float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF();
        float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF();
 
-       bounds.y = bounds.y + topTouchMargin;
        bounds.width = bounds.width - rightTouchMargin;
 
        float height = 0.0f;
@@ -1851,7 +1850,7 @@ _Toolbar::SetButtonBadgeIcon(ToolbarButton position, const Bitmap* pBadgeIcon)
 
        if (pBadgeIconLabel)
        {
-               pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, bounds.y, height, height));
+               pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, topTouchMargin, height, height));
                pBadgeIconLabel->SetBackgroundBitmap(*pBadgeIcon);
 
                __pButtonItems[position]->AttachChild(*pBadgeIconLabel);
@@ -1981,7 +1980,6 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number)
                float topTouchMargin = __pButtonItems[position]->GetTopTouchMarginF();
                float rightTouchMargin = __pButtonItems[position]->GetRightTouchMarginF();
 
-               bounds.y = bounds.y + topTouchMargin;
                bounds.width = bounds.width - rightTouchMargin;
 
                if (existingBadgeIcon)
@@ -2018,7 +2016,7 @@ _Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number)
                                GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
                        }
 
-                       existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, bounds.y, width, height));
+                       existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, topTouchMargin, width, height));
                        existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
 
                        Integer tempNumber(number);
@@ -7788,7 +7786,7 @@ _Toolbar::RearrangeItems(void)
                                        }
                                        else
                                        {
-                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
+                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
                                                                headerRightButtonWidth, headerButtonItemHeight));
                                                __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
                                                                headerLeftButtonWidth, headerButtonItemHeight));
@@ -7837,7 +7835,7 @@ _Toolbar::RearrangeItems(void)
                                        }
                                        else
                                        {
-                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
+                                               __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
                                                                headerRightButtonWidth, headerButtonItemHeight));
                                                __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
                                                                headerLeftButtonWidth, headerButtonItemHeight));
@@ -7883,7 +7881,7 @@ _Toolbar::RearrangeItems(void)
                                }
                                else
                                {
-                                       __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
+                                       __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin,
                                                        headerRightButtonWidth, headerButtonItemHeight));
 
                                        if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE)
@@ -7925,7 +7923,7 @@ _Toolbar::RearrangeItems(void)
                        }
                        else
                        {
-                               __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth + 1, vmargin,
+                               __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin,
                                                headerLeftButtonWidth, headerButtonItemHeight));
 
                                if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE)
@@ -8176,14 +8174,12 @@ _Toolbar::RearrangeHeaderSegmentedItems(void)
 {
        float segmentedItemHeight = 0.0f;
        float leftMargin = 0.0f;
-       float dividerWidth = 0.0f;
        float vmargin = 0.0f;
        float blockWidth[__itemCount];
        float fontSize = 0.0f;
        float multilineFontSize = 0.0f;
 
        GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), leftMargin);
-       GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth);
 
        if (__style == TOOLBAR_HEADER_SEGMENTED)
        {
@@ -8200,18 +8196,16 @@ _Toolbar::RearrangeHeaderSegmentedItems(void)
        {
                if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button
                {
-                       blockWidth[0] = blockWidth[1] = (GetSizeF().width - dividerWidth ) / 2;
-
-                       blockWidth[1] += 1;
+                       blockWidth[0] = blockWidth[1] = GetSizeF().width / 2;
                }
                else
                {
-                       blockWidth[0] = blockWidth[1] = (__itemArea.width + leftMargin - dividerWidth) / 2;
+                       blockWidth[0] = blockWidth[1] = (__itemArea.width + leftMargin) / 2;
                }
 
                for (int i = 0; i < __itemCount ; i++)
                {
-                       __pItems.at(i)->SetBounds(FloatRectangle(blockWidth[0] * i + dividerWidth * i, vmargin, blockWidth[i], segmentedItemHeight));
+                       __pItems.at(i)->SetBounds(FloatRectangle(blockWidth[0] * i, vmargin, blockWidth[i], segmentedItemHeight));
 
                        if (__pItems.at(i)->GetChildCount() != 0)
                        {
@@ -8240,20 +8234,22 @@ _Toolbar::RearrangeHeaderSegmentedItems(void)
        {
                if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button
                {
-                       blockWidth[0] = blockWidth[1] = blockWidth[2] = (GetSizeF().width - dividerWidth * 2) / 3;
+                       blockWidth[0] = blockWidth[1] = blockWidth[2] = GetSizeF().width / 3;
+                       blockWidth[1] += 1;
 
                        __pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
-                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0] + dividerWidth, vmargin, blockWidth[1], segmentedItemHeight));
-                       __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],vmargin, blockWidth[2] + 2, segmentedItemHeight));
+                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight));
+                       __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], vmargin, blockWidth[2] + 1, segmentedItemHeight));
                }
                else
                {
-                       blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width + leftMargin - dividerWidth * 2) / 3;
+                       blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width + leftMargin) / 3;
+                       blockWidth[1] += 1;
 
                        __pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
-                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0] + dividerWidth, vmargin, blockWidth[1], segmentedItemHeight));
-                       __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                       vmargin, blockWidth[2], segmentedItemHeight));
+                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight));
+                       __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] - 1,
+                                       vmargin, blockWidth[2] + 1, segmentedItemHeight));
                }
 
                for (int i = 0; i < __itemCount; i++)
@@ -8285,24 +8281,24 @@ _Toolbar::RearrangeHeaderSegmentedItems(void)
        {
                if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button
                {
-                       blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (GetSizeF().width - dividerWidth * 3) / 4;
+                       blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = GetSizeF().width / 4;
 
                        __pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
-                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0] + dividerWidth, vmargin, blockWidth[1], segmentedItemHeight));
-                       __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + dividerWidth * 2,
+                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight));
+                       __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1],
                                        vmargin, blockWidth[2], segmentedItemHeight));
-                       __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
-                                       vmargin, blockWidth[3] + 1, segmentedItemHeight));
+                       __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2],
+                                       vmargin, blockWidth[3], segmentedItemHeight));
                }
                else
                {
-                       blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width + leftMargin - dividerWidth * 3) / 4;
+                       blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width + leftMargin) / 4;
 
                        __pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
-                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0] + dividerWidth, vmargin, blockWidth[1], segmentedItemHeight));
-                       __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + dividerWidth * 2,
+                       __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight));
+                       __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1],
                                        vmargin, blockWidth[2], segmentedItemHeight));
-                       __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
+                       __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2],
                                        vmargin, blockWidth[3], segmentedItemHeight));
                }
 
@@ -8344,7 +8340,6 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
        float rightMargin = 0.0f;
        float footerLeftMargin = 0.0f;
        float iconSize = 0.0f;
-       float dividerWidth = 0.0f;
        float blockWidth[__itemCount];
        float fontSize = 0.0f;
        float multilineFontSize = 0.0f;
@@ -8352,6 +8347,9 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
        float itemButtonLeftGap = 0.0f;
        float itemButtonRightGap = 0.0f;
 
+       float dividerWidth = 0.0f;
+
+
        GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), leftMargin);
        GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin);
        GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_ICON_SIZE, GetOrientation(), iconSize);
@@ -8396,11 +8394,11 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                {
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth * 2, segmentedItemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth * 2, segmentedItemHeight));
                        }
                        else
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
                        }
                }
                else
@@ -8463,19 +8461,19 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                        itemButtonLeftGap = 0;
                }
 
-               blockWidth[0] = blockWidth[1] = (__itemArea.width - dividerWidth) / 2;
+               blockWidth[0] = blockWidth[1] = __itemArea.width / 2;
 
                if (__pButtonItems[LEFT_BUTTON])
                {
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight));
                        }
                        else
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight));
                        }
                }
                else
@@ -8483,12 +8481,12 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight));
                        }
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
                        }
                }
 
@@ -8542,22 +8540,23 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                        itemButtonLeftGap = 0;
                }
 
-               blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width - dividerWidth * 2) / 3;
+               blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3;
+               blockWidth[1] += 1;
 
                if (__pButtonItems[LEFT_BUTTON])
                {
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1,
+                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth + 1, segmentedItemHeight));
                        }
                        else
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
+                               __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
                                                (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight));
                        }
                }
@@ -8566,16 +8565,16 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2],
+                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth + 1, segmentedItemHeight));
                        }
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
+                                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 1, segmentedItemHeight));
                        }
                }
 
@@ -8600,14 +8599,14 @@ _Toolbar::RearrangeFooterSegmentedItems(void)
        {
                leftMargin = 0;
 
-               blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width - dividerWidth * 3) / 4;
+               blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = __itemArea.width / 4;
 
                __pItems.at(0)->SetBounds(FloatRectangle(leftMargin, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
-               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
-               __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
+               __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+               __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1],
                                (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
-               __pItems.at(3)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
-                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3] + 1, segmentedItemHeight));
+               __pItems.at(3)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2],
+                               (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3], segmentedItemHeight));
 
                for (int i = 0; i < __itemCount ; i++)
                {
@@ -8647,10 +8646,8 @@ _Toolbar::RearrangeTabItmes(void)
        float segmentedItemHeight = 0.0f;
        float tabLeftMargin = 0.0f;
        float vmargin = 0.0f;
-       float dividerWidth = 0.0f;
 
        GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin);
-       GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth);
 
        if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE)
        {
@@ -8681,10 +8678,10 @@ _Toolbar::RearrangeTabItmes(void)
        }
        else if (__itemCount == 2)
        {
-               itemWidth[0] = itemWidth[1] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth) / 2;
+               itemWidth[0] = itemWidth[1] = (__itemArea.width - tabLeftMargin * 2) / 2;
 
                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
-               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1] + 1, segmentedItemHeight));
+               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
 
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
 
@@ -8699,11 +8696,12 @@ _Toolbar::RearrangeTabItmes(void)
        }
        else if (__itemCount == 3)
        {
-               itemWidth[0] = itemWidth[1] = itemWidth[2] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth * 2) / 3;
+               itemWidth[0] = itemWidth[1] = itemWidth[2] = (__itemArea.width - tabLeftMargin * 2) / 3;
+               itemWidth[1] += 1;
 
                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
-               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
-               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2, vmargin, itemWidth[2] + 2, segmentedItemHeight));
+               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
+               __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - itemWidth[2], vmargin, itemWidth[2] + 1, segmentedItemHeight));
 
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26
 
@@ -8718,14 +8716,14 @@ _Toolbar::RearrangeTabItmes(void)
        }
        else
        {
-               itemWidth[0] = itemWidth[1] = itemWidth[2] = itemWidth[3] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth * 3) / 4;
+               itemWidth[0] = itemWidth[1] = itemWidth[2] = itemWidth[3] = (__itemArea.width - tabLeftMargin * 2) / 4;
 
                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
-               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
-               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2,
+               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
+               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1],
                                vmargin, itemWidth[2], segmentedItemHeight));
-               __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + itemWidth[2] + dividerWidth * 3,
-                               vmargin, itemWidth[3] + 1, segmentedItemHeight));
+               __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + itemWidth[2],
+                               vmargin, itemWidth[3], segmentedItemHeight));
 
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); // 24
                GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
@@ -8735,7 +8733,7 @@ _Toolbar::RearrangeTabItmes(void)
        {
                itemWidth[i] = itemWidth[0];
 
-               __pItems.at(i)->SetBounds(FloatRectangle(__pItems.at(i-1)->GetBoundsF().x + dividerWidth + itemWidth[i], vmargin, itemWidth[i], segmentedItemHeight));
+               __pItems.at(i)->SetBounds(FloatRectangle(__pItems.at(i-1)->GetBoundsF().x + itemWidth[i], vmargin, itemWidth[i], segmentedItemHeight));
        }
 
        for (int i = 0; i < __itemCount ; i++)
@@ -8768,7 +8766,6 @@ _Toolbar::RearrangeButtonItems(void)
        float itemButtonLeftGap = 0.0f;
        float itemButtonRightGap = 0.0f;
        float tabLeftMargin = 0.0f;
-       float dividerWidth = 0.0f;
        float iconSize = 0.0f;
        float footerLeftMargin = 0.0f;
        float segmentedItemHeight = 0.0f;
@@ -8776,14 +8773,16 @@ _Toolbar::RearrangeButtonItems(void)
        float blockWidth[__itemCount];
        float fontSize = 0.0f;
        float multilineFontSize = 0.0f;
+       float dividerWidth = 0.0f;
 
-       GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth);
        GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_ICON_SIZE, GetOrientation(), iconSize);
        GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin);
        GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, GetOrientation(), tabLeftMargin);
        GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, GetOrientation(), sideMargin);
        GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedItemHeight);
        GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin);
+       GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth);
+
 
        float tabRightMargin = tabLeftMargin;
 
@@ -8842,11 +8841,11 @@ _Toolbar::RearrangeButtonItems(void)
                        {
                                if (__pButtonItems[RIGHT_BUTTON])
                                {
-                                       __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth * 2, itemHeight));
+                                       __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth * 2, itemHeight));
                                }
                                else
                                {
-                                       __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+                                       __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
                                }
                        }
                        else
@@ -8910,19 +8909,19 @@ _Toolbar::RearrangeButtonItems(void)
                        iconSize = 0;
                }
 
-               blockWidth[0] = blockWidth[1] = (__itemArea.width - dividerWidth * 1) / 2;
+               blockWidth[0] = blockWidth[1] = __itemArea.width / 2;
 
                if (__pButtonItems[LEFT_BUTTON])
                {
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
                        }
                        else
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
                        }
                }
                else
@@ -8930,12 +8929,12 @@ _Toolbar::RearrangeButtonItems(void)
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight));
                        }
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
                        }
                }
 
@@ -8989,22 +8988,23 @@ _Toolbar::RearrangeButtonItems(void)
                        iconSize = 0;
                }
 
-               blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width - dividerWidth * 2) / 3;
+               blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3;
+               blockWidth[1] += 1;
 
                if (__pButtonItems[LEFT_BUTTON])
                {
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth, itemHeight));
+                               __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1,
+                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight));
                        }
                        else
                        {
-                               __pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
+                               __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
                                                        (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
                        }
                }
@@ -9013,16 +9013,16 @@ _Toolbar::RearrangeButtonItems(void)
                        if (__pButtonItems[RIGHT_BUTTON])
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2],
+                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight));
                        }
                        else
                        {
                                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
-                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
-                               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
-                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
+                               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+                               __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
+                                               (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 1, itemHeight));
                        }
                }
 
@@ -9046,14 +9046,14 @@ _Toolbar::RearrangeButtonItems(void)
        {
                __itemArea.width -= tabLeftMargin * 2;
 
-               blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width - dividerWidth * 3) / 4;
+               blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = __itemArea.width / 4;
 
                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
-               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
-               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
+               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1],
                                (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
-               __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
-                               (GetSizeF().height - itemHeight) / 2, blockWidth[3] + 1, itemHeight));
+               __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2],
+                               (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
 
                for (int i = 0; i < __itemCount; i++)
                {
@@ -9075,16 +9075,16 @@ _Toolbar::RearrangeButtonItems(void)
        {
                __itemArea.width -= tabLeftMargin * 2;
 
-               blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = blockWidth[4] = (__itemArea.width - dividerWidth * 4) / 5;
+               blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = blockWidth[4] = __itemArea.width / 5;
 
                __pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
-               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
-               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
+               __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+               __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1],
                                (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
-               __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
+               __pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2],
                                (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
-               __pItems.at(4)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3] + dividerWidth * 4,
-                               (GetSizeF().height - itemHeight) / 2, blockWidth[4] + 1, itemHeight));
+               __pItems.at(4)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3],
+                               (GetSizeF().height - itemHeight) / 2, blockWidth[4], itemHeight));
 
                for (int i = 0; i < __itemCount; i++)
                {
index b60a619..567d9af 100644 (file)
@@ -374,16 +374,16 @@ _ToolbarPresenter::DrawDivider(void)
                {
                        if (__pToolbar->GetButton(LEFT_BUTTON))
                        {
-                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
 
                                DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap
-                                               - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                                               - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
                        }
                        else
                        {
-                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
                        }
                }
@@ -391,7 +391,7 @@ _ToolbarPresenter::DrawDivider(void)
                {
                        if (__pToolbar->GetButton(LEFT_BUTTON))
                        {
-                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
                        }
                }
@@ -402,16 +402,16 @@ _ToolbarPresenter::DrawDivider(void)
                {
                        if (__pToolbar->GetButton(LEFT_BUTTON))
                        {
-                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
 
                                DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap
-                                               - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                                               - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
                        }
                        else
                        {
-                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
                        }
                }
@@ -419,7 +419,7 @@ _ToolbarPresenter::DrawDivider(void)
                {
                        if (__pToolbar->GetButton(LEFT_BUTTON))
                        {
-                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                               DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                                dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
                        }
                }
@@ -428,13 +428,13 @@ _ToolbarPresenter::DrawDivider(void)
        {
                if (__pToolbar->GetButton(RIGHT_BUTTON))
                {
-                       DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+                       DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2,
                                        (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
                }
 
                if (__pToolbar->GetButton(LEFT_BUTTON))
                {
-                       DrawDividerLine(FloatPoint(__pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width,
+                       DrawDividerLine(FloatPoint(__pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width + buttonItemGap / 2,
                                        (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
                }
        }
@@ -449,16 +449,32 @@ _ToolbarPresenter::DrawDivider(void)
                {
                        for (int i = 0; i < itemCount - 1 ; i++)
                        {
-                               DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width,
-                                               dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
+                               if (i < itemCount - 2)
+                               {
+                                       DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width,
+                                                       dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
+                               }
+                               else // i == (itemCount - 2)
+                               {
+                                       DrawDividerLine(FloatPoint(__pToolbar->GetItem(i + 1)->GetBoundsF().x,
+                                                       dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
+                               }
                        }
                }
                else
                {
                        for (int i = 0; i < itemCount - 1 ; i++)
                        {
-                               DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width,
-                                               (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+                               if (i < itemCount - 2)
+                               {
+                                       DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width,
+                                                       (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+                               }
+                               else // i == (itemCount - 2)
+                               {
+                                       DrawDividerLine(FloatPoint(__pToolbar->GetItem(i + 1)->GetBoundsF().x,
+                                                       (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+                               }
                        }
                }
        }
@@ -761,6 +777,7 @@ _ToolbarPresenter::DrawItems(void)
        _Label* pTitleBadgeIcon = __pToolbar->GetTitleBadgeIcon();
 
        float iconWidth = 0.0f;
+       float iconRightMargin = 0.0f;
        float titleDisplayHeight = 0.0f;
        float leftMargin = 0.0f;
        float headerTopMargin = 0.0f;
@@ -793,6 +810,7 @@ _ToolbarPresenter::DrawItems(void)
        }
 
        GET_SHAPE_CONFIG(HEADER::ICON_WIDTH, __pToolbar->GetOrientation(), iconWidth);
+       GET_SHAPE_CONFIG(HEADER::ICON_RIGHT_MARGIN, __pToolbar->GetOrientation(), iconRightMargin);
 
        if (!__titleText.IsEmpty())
        {
@@ -862,7 +880,7 @@ _ToolbarPresenter::DrawItems(void)
                        {
                                pCanvas->DrawBitmap(FloatPoint(usableArea.x, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon));
 
-                               __titleRect.x = usableArea.x + pTitleIcon->GetWidthF() + usableArea.x;
+                               __titleRect.x = usableArea.x + pTitleIcon->GetWidthF() + iconRightMargin;
                                __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2;
 
                                if (__pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) != ANIMATION_STOPPED)
@@ -902,7 +920,7 @@ _ToolbarPresenter::DrawItems(void)
 
                        if (pTitleIcon)
                        {
-                               __titleRect.x = leftMargin + pTitleIcon->GetWidthF() + leftMargin;
+                               __titleRect.x = leftMargin + pTitleIcon->GetWidthF() + iconRightMargin;
                                __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2;
 
                                if(__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_CENTER)
index 14d019e..0e4d8a1 100644 (file)
@@ -294,6 +294,7 @@ DECLARE_UI_CONFIG(HEADER);
        DECLARE_SHAPE_CONFIG(BUTTON_ITEM_MARGIN_WITH_TEXT, 76);
        DECLARE_SHAPE_CONFIG(TAB_TEXT_DIM_WIDTH, 77);
        DECLARE_SHAPE_CONFIG(TITLE_TEXT_DIM_WIDTH, 78);
+       DECLARE_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 79);
 
 
 DECLARE_END_UI_CONFIG(HEADER);
index 4a8502b..c1ed963 100644 (file)
@@ -338,6 +338,7 @@ START_UI_CONFIG(HEADER);
 
                ADD_SHAPE_CONFIG(ICON_WIDTH, 45);
                ADD_SHAPE_CONFIG(ICON_TEXT_GAP, 8);
+               ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16);
 
                ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2);
                ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48);
@@ -436,6 +437,7 @@ START_UI_CONFIG(HEADER);
 
                ADD_SHAPE_CONFIG(ICON_WIDTH, 45);
                ADD_SHAPE_CONFIG(ICON_TEXT_GAP, 8);
+               ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16);
 
                ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2);
                ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48);