When update layout, logic calculating clientbounds of form was fixed.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 22 Mar 2013 04:46:31 +0000 (13:46 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 22 Mar 2013 04:46:31 +0000 (13:46 +0900)
Change-Id: Id7fb138d876f1337da386c03612571fdc860aa51

src/ui/controls/FUiCtrl_Form.cpp
src/ui/inc/FUiCtrl_Form.h

index ac9d0e6..c787553 100644 (file)
@@ -2687,5 +2687,78 @@ _Form::GetFocusList(void) const
        return __pFocusControlList.get();
 }
 
+void
+_Form::UpdateClientBounds(const FloatDimension& size)
+{
+       FloatRectangle clientBounds(0.0f, 0.0f, size.width, size.height);
+
+       if (__deflated)
+       {
+               clientBounds.height -= __deflatedHeight;
+       }
+
+       FloatRectangle indicatorBounds = GetIndicatorBoundsF();
+
+       _Control* pParent = GetParent();
+       _Frame* pFrame = dynamic_cast<_Frame*>(pParent);
+       if (pFrame)
+       {
+               FrameShowMode mode = pFrame->GetShowMode();
+               if (mode == FRAME_SHOW_MODE_FULL_SCREEN)
+               {
+                       if (FORM_STYLE_INDICATOR & __formStyle)
+                       {
+                               if (IsIndicatorVisible() && !IsIndicatorTranslucent())
+                               {
+                                       clientBounds.y += indicatorBounds.height;
+                                       clientBounds.height -= indicatorBounds.height;
+                               }
+                       }
+               }
+       }
+       else
+       {
+               if (FORM_STYLE_INDICATOR & __formStyle)
+               {
+                       if (IsIndicatorVisible() && !IsIndicatorTranslucent())
+                       {
+                               clientBounds.y += indicatorBounds.height;
+                               clientBounds.height -= indicatorBounds.height;
+                       }
+               }
+       }
+
+       if (__pHeader)
+       {
+               if (__pHeader->GetVisibleState() && !IsHeaderTranslucent())
+               {
+                       clientBounds.y += GetToolbarHeightF(true);
+                       clientBounds.height -= GetToolbarHeightF(true);
+               }
+       }
+
+       if (__pTab)
+       {
+               if (__pTab->GetVisibleState()) //&& !IsHeaderTranslucent())
+               {
+                       clientBounds.y += GetTabHeightF();
+                       clientBounds.height -= GetTabHeightF();
+               }
+       }
+
+       if (__pFooter)
+       {
+               if (FORM_STYLE_FOOTER & __formStyle || FORM_STYLE_SOFTKEY_0 & __formStyle || FORM_STYLE_SOFTKEY_1 & __formStyle
+                               || FORM_STYLE_OPTIONKEY & __formStyle)
+               {
+                       if (__pFooter->GetVisibleState() && !IsFooterTranslucent())
+                       {
+                                       clientBounds.height -= GetToolbarHeightF(false);
+                       }
+               }
+       }
+
+       SetClientBounds(clientBounds);
+}
 
 }}} // Tizen::Ui::Controls
index a8efdb4..ffef5a0 100644 (file)
@@ -198,6 +198,7 @@ public:
        virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
        virtual void OnChildVisibleStateChanged(const _Control& child);
        virtual void OnBoundsChanged(void);
+       virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size);
 
 // Focus UI
    Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;