From: Keuckdo Bang Date: Fri, 22 Mar 2013 04:46:31 +0000 (+0900) Subject: When update layout, logic calculating clientbounds of form was fixed. X-Git-Tag: accepted/tizen_2.1/20130425.033138~786 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78923881bedaec90f542c94cc2e524389fdc54d8;p=platform%2Fframework%2Fnative%2Fuifw.git When update layout, logic calculating clientbounds of form was fixed. Change-Id: Id7fb138d876f1337da386c03612571fdc860aa51 --- diff --git a/src/ui/controls/FUiCtrl_Form.cpp b/src/ui/controls/FUiCtrl_Form.cpp index ac9d0e6..c787553 100644 --- a/src/ui/controls/FUiCtrl_Form.cpp +++ b/src/ui/controls/FUiCtrl_Form.cpp @@ -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 diff --git a/src/ui/inc/FUiCtrl_Form.h b/src/ui/inc/FUiCtrl_Form.h index a8efdb4..ffef5a0 100644 --- a/src/ui/inc/FUiCtrl_Form.h +++ b/src/ui/inc/FUiCtrl_Form.h @@ -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;