Changed windowRect of its real size.
authorclone <ingyou.park@samsung.com>
Tue, 14 May 2013 05:57:49 +0000 (14:57 +0900)
committerclone <ingyou.park@samsung.com>
Tue, 14 May 2013 05:57:49 +0000 (14:57 +0900)
Change-Id: I187387d1ee0e372a19f4f24c0e5daec48bb6bf86
Signed-off-by: clone <ingyou.park@samsung.com>
src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp
src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp

index 82d882d..ce143c2 100644 (file)
@@ -515,16 +515,16 @@ _ContextMenuGridPresenter::CalculateRect(void)
                }
 
                windowRect.x = bodyRect.x;
-               windowRect.y = bodyRect.y;
+               windowRect.y = bodyRect.y + __arrowTopMargin - __anchorPopupOverlap;
                windowRect.width = bodyRect.width;
-               windowRect.height = bodyRect.height + arrowRect.height;
+               windowRect.height = bodyRect.height + arrowRect.height - (__arrowTopMargin - __anchorPopupOverlap);
 
                bodyRect.x = 0.0f;
-               bodyRect.y = __arrowTopMargin - __anchorPopupOverlap;
+               bodyRect.y = 0.0f;
 
                // Set arrow position
                arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x;
-               arrowRect.y = bodyRect.height;
+               arrowRect.y = bodyRect.height - (__arrowTopMargin - __anchorPopupOverlap);
        }
        else if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_DOWN)    // up Arrow
        {
@@ -573,7 +573,7 @@ _ContextMenuGridPresenter::CalculateRect(void)
                windowRect.x = bodyRect.x;
                windowRect.y = bodyRect.y - arrowRect.height;
                windowRect.width = bodyRect.width;
-               windowRect.height = bodyRect.height + arrowRect.height;
+               windowRect.height = bodyRect.height + arrowRect.height - __arrowBottomMargin + __anchorPopupOverlap;
 
                bodyRect.x = 0.0f;
                bodyRect.y = arrowRect.height - __arrowBottomMargin + __anchorPopupOverlap;
@@ -632,16 +632,16 @@ _ContextMenuGridPresenter::CalculateRect(void)
                        bodyRect.y = bottomBoundary - bodyRect.height;
                }
 
-               windowRect.x = bodyRect.x;
+               windowRect.x = bodyRect.x + __arrowRightMargin - __anchorPopupOverlap;
                windowRect.y = bodyRect.y;
-               windowRect.width = bodyRect.width + arrowRect.width;
+               windowRect.width = bodyRect.width + arrowRect.width - (__arrowRightMargin - __anchorPopupOverlap);
                windowRect.height = bodyRect.height;
 
-               bodyRect.x = __arrowRightMargin - __anchorPopupOverlap;
+               bodyRect.x = 0.0f;
                bodyRect.y = 0.0f;
 
                // Set arrow position
-               arrowRect.x = bodyRect.width;
+               arrowRect.x = bodyRect.width - (__arrowRightMargin - __anchorPopupOverlap);
                arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y;
        }
        else    // left Arrow
@@ -695,7 +695,7 @@ _ContextMenuGridPresenter::CalculateRect(void)
 
                windowRect.x = bodyRect.x;
                windowRect.y = bodyRect.y;
-               windowRect.width = bodyRect.width + arrowRect.width;
+               windowRect.width = bodyRect.width + arrowRect.width - __arrowLeftMargin + __anchorPopupOverlap;
                windowRect.height = bodyRect.height;
 
                bodyRect.x = arrowRect.width - __arrowLeftMargin + __anchorPopupOverlap;
index 7491ad8..fd7baab 100644 (file)
@@ -506,16 +506,16 @@ _ContextMenuListPresenter::CalculateRect(void)
                }
 
                windowRect.x = bodyRect.x;
-               windowRect.y = bodyRect.y;
+               windowRect.y = bodyRect.y + __arrowTopMargin - __anchorPopupOverlap;
                windowRect.width = bodyRect.width;
-               windowRect.height = bodyRect.height + arrowRect.height;
+               windowRect.height = bodyRect.height + arrowRect.height - (__arrowTopMargin - __anchorPopupOverlap);
 
                bodyRect.x = 0.0f;
-               bodyRect.y = __arrowTopMargin - __anchorPopupOverlap;
+               bodyRect.y = 0.0f;
 
                // Set arrow position
                arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x;
-               arrowRect.y = bodyRect.height;
+               arrowRect.y = bodyRect.height - (__arrowTopMargin - __anchorPopupOverlap);
        }
        else if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_DOWN)    // up Arrow
        {
@@ -564,7 +564,7 @@ _ContextMenuListPresenter::CalculateRect(void)
                windowRect.x = bodyRect.x;
                windowRect.y = bodyRect.y - arrowRect.height;
                windowRect.width = bodyRect.width;
-               windowRect.height = bodyRect.height + arrowRect.height;
+               windowRect.height = bodyRect.height + arrowRect.height - __arrowBottomMargin + __anchorPopupOverlap;
 
                bodyRect.x = 0.0f;
                bodyRect.y = arrowRect.height - __arrowBottomMargin + __anchorPopupOverlap;
@@ -623,16 +623,16 @@ _ContextMenuListPresenter::CalculateRect(void)
                        bodyRect.y = bottomBoundary - bodyRect.height;
                }
 
-               windowRect.x = bodyRect.x;
+               windowRect.x = bodyRect.x + __arrowRightMargin - __anchorPopupOverlap;
                windowRect.y = bodyRect.y;
-               windowRect.width = bodyRect.width + arrowRect.width;
+               windowRect.width = bodyRect.width + arrowRect.width - (__arrowRightMargin - __anchorPopupOverlap);
                windowRect.height = bodyRect.height;
 
-               bodyRect.x = __arrowRightMargin - __anchorPopupOverlap;
+               bodyRect.x = 0.0f;
                bodyRect.y = 0.0f;
 
                // Set arrow position
-               arrowRect.x = bodyRect.width;
+               arrowRect.x = bodyRect.width - (__arrowRightMargin - __anchorPopupOverlap);
                arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y;
        }
        else    // left Arrow
@@ -686,7 +686,7 @@ _ContextMenuListPresenter::CalculateRect(void)
 
                windowRect.x = bodyRect.x;
                windowRect.y = bodyRect.y;
-               windowRect.width = bodyRect.width + arrowRect.width;
+               windowRect.width = bodyRect.width + arrowRect.width - __arrowLeftMargin + __anchorPopupOverlap;
                windowRect.height = bodyRect.height;
 
                bodyRect.x = arrowRect.width - __arrowLeftMargin + __anchorPopupOverlap;