From: sr.shashank Date: Wed, 26 Jun 2013 07:54:36 +0000 (+0530) Subject: Fix for N_SE-43049 - OptionMenu Orientation aligned with its parent. X-Git-Tag: submit/tizen_2.2/20130714.153149~263^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08559ba54048183a747557ef63a47d16759b5091;p=framework%2Fosp%2Fuifw.git Fix for N_SE-43049 - OptionMenu Orientation aligned with its parent. Signed-off-by: sr.shashank Change-Id: I6eb4b42eaff0d2c007cc563ff6615902f746d14d Signed-off-by: sr.shashank --- diff --git a/src/ui/controls/FUiCtrl_OptionMenu.cpp b/src/ui/controls/FUiCtrl_OptionMenu.cpp index b7f78ba..e955536 100755 --- a/src/ui/controls/FUiCtrl_OptionMenu.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenu.cpp @@ -1333,14 +1333,7 @@ _OptionMenu::OnFontInfoRequested(unsigned long& style, float& size) void _OptionMenu::OnChangeLayout(_ControlRotation rotation) { - if (rotation == _CONTROL_ROTATION_0 || rotation == _CONTROL_ROTATION_180) - { - __layout = _CONTROL_ORIENTATION_PORTRAIT; - } - else - { - __layout = _CONTROL_ORIENTATION_LANDSCAPE; - } + __layout = GetOwner()->GetOrientation(); if (!__isMaxVisibleCountSet) { diff --git a/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp index 5f7908e..dda518a 100755 --- a/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp +++ b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp @@ -490,7 +490,7 @@ _OptionMenuPresenter::CalculateRect(void) bodyRect.width = __layoutSize.width + bodyLeftMargin + bodyRightMargin; bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin; - if (rotation == _CONTROL_ROTATION_270) + if (rotation == _CONTROL_ROTATION_270 && __pOptionMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) { bodyRect.x = screen.width - bodyRect.width; }