+ if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+ _Form* pCurForm = GetCurrentForm();
+ if (pCurForm)
+ {
+ orientation = pCurForm->GetOrientation();
+ }
+ else
+ {
+ orientation = GetOrientation();
+ }
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__floatingOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y);
+ FloatPoint curPoint(prevPoint.x, prevPoint.y);
+ float ratio = screenSize.width / screenSize.height;
+
+ if (prevPoint.x > 0.0f)
+ {
+ curPoint.x = prevPoint.x * ratio;
+ }
+
+ if (prevPoint.y > 0.0f)
+ {
+ curPoint.y = prevPoint.y / ratio;
+ }
+
+ __floatingBounds.x = curPoint.x;
+ __floatingBounds.y = curPoint.y;
+ }
+ }
+ else
+ {
+ if (__floatingOrientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y);
+ FloatPoint curPoint(prevPoint.x, prevPoint.y);
+ float ratio = screenSize.width / screenSize.height;
+
+ if (prevPoint.x > 0.0f)
+ {
+ curPoint.x = prevPoint.x / ratio;
+ }
+
+ if (prevPoint.y > 0.0f)
+ {
+ curPoint.y = prevPoint.y * ratio;
+ }
+
+ __floatingBounds.x = curPoint.x;
+ __floatingBounds.y = curPoint.y;
+ }
+ }
+ }
+