Fix bug candidate region is shrinked in common profile 20/249220/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 9 Dec 2020 02:51:36 +0000 (11:51 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 9 Dec 2020 02:56:39 +0000 (11:56 +0900)
Change-Id: I917e2ad215864e4553b3a585c7d6feb7ea8448ab
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/candidate/efl/candidate-multiline-efl.cpp

index 303900c..6ff28f0 100644 (file)
@@ -693,23 +693,33 @@ EflMultiLineCandidate::rotate(int degree)
     elm_win_screen_size_get(m_window, NULL, NULL, &scr_w, &scr_h);
     m_screenWidth = scr_w;
     m_screenHeight = scr_h;
+    bool landscape_display_device = false;
+
+    if (scr_w > scr_h)
+        landscape_display_device = true;
 
     switch (degree) {
         case 0:
-            m_screenWidth = MIN(scr_w, scr_h);
-            m_screenHeight = MAX(scr_w, scr_h);
-            break;
         case 180:
-            m_screenWidth = MIN(scr_w, scr_h);
-            m_screenHeight = MAX(scr_w, scr_h);
+            if (landscape_display_device) {
+                m_screenWidth = MAX(scr_w, scr_h);
+                m_screenHeight = MIN(scr_w, scr_h);
+            }
+            else {
+                m_screenWidth = MIN(scr_w, scr_h);
+                m_screenHeight = MAX(scr_w, scr_h);
+            }
             break;
         case 90:
-            m_screenWidth = MAX(scr_w, scr_h);
-            m_screenHeight = MIN(scr_w, scr_h);
-            break;
         case 270:
-            m_screenWidth = MAX(scr_w, scr_h);
-            m_screenHeight = MIN(scr_w, scr_h);
+            if (landscape_display_device) {
+                m_screenWidth = MIN(scr_w, scr_h);
+                m_screenHeight = MAX(scr_w, scr_h);
+            }
+            else {
+                m_screenWidth = MAX(scr_w, scr_h);
+                m_screenHeight = MIN(scr_w, scr_h);
+            }
             break;
         default:
             break;