Fix for N_SE-43049 - OptionMenu Orientation aligned with its parent.
authorsr.shashank <sr.shashank@samsung.com>
Wed, 26 Jun 2013 07:54:36 +0000 (13:24 +0530)
committersr.shashank <sr.shashank@samsung.com>
Wed, 26 Jun 2013 10:13:53 +0000 (15:43 +0530)
Signed-off-by: sr.shashank <sr.shashank@samsung.com>
Change-Id: I6eb4b42eaff0d2c007cc563ff6615902f746d14d
Signed-off-by: sr.shashank <sr.shashank@samsung.com>
src/ui/controls/FUiCtrl_OptionMenu.cpp
src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp

index b7f78ba..e955536 100755 (executable)
@@ -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)
        {
index 5f7908e..dda518a 100755 (executable)
@@ -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;
        }