From c33f44b60da52d02a6187ebf62b5aa7dd715f278 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 9 Dec 2020 11:51:36 +0900 Subject: [PATCH] Fix bug candidate region is shrinked in common profile Change-Id: I917e2ad215864e4553b3a585c7d6feb7ea8448ab Signed-off-by: Jihoon Kim --- src/candidate/efl/candidate-multiline-efl.cpp | 30 ++++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/candidate/efl/candidate-multiline-efl.cpp b/src/candidate/efl/candidate-multiline-efl.cpp index 303900c..6ff28f0 100644 --- a/src/candidate/efl/candidate-multiline-efl.cpp +++ b/src/candidate/efl/candidate-multiline-efl.cpp @@ -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; -- 2.7.4