Adjust voice layout when keyboard is ratationed 38/91138/2
authorsungwook79.park <sungwook79.park@samsung.com>
Thu, 6 Oct 2016 04:47:34 +0000 (13:47 +0900)
committersungwook79.park <sungwook79.park@samsung.com>
Thu, 6 Oct 2016 05:25:15 +0000 (14:25 +0900)
Change-Id: Ifcca279bad335b89402fe8e7d0b42013d9df5f7c
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
src/ise-stt-mode.cpp
src/ise.cpp

index c6f59d6..a937741 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 
 #include "ise.h"
+#include "utils.h"
 #include "ise-stt-mode.h"
 #include "ise-stt-option.h"
 
 #define STT_EDJ_FILE "edje/mobile/w-input-stt.edj"
 #endif
 
-
 VoiceData *my_voicedata = NULL;
 static Evas_Object *win_main = NULL;
-
+extern CSCLUI *g_ui;
 
 static void set_guide_text(VoiceData *vd, const char* text, bool translatable = false);
 static void _popup_close_cb(void *data, Evas_Object *obj, void *event_info);
@@ -547,12 +547,9 @@ Evas_Object *create_fullview(Evas_Object *win, VoiceData *r_voicedata)
 {
     LOGD("create_fullview");
 
-    //win_main = win;
     VoiceData *voicedata = r_voicedata;
 
     int ret;
-    Evas_Coord win_w, win_h;
-
     init_customizing_theme();
 
     Evas_Object *layout_main = elm_layout_add(win);
@@ -596,8 +593,8 @@ Evas_Object *create_fullview(Evas_Object *win, VoiceData *r_voicedata)
     // add callback
     elm_object_signal_callback_add(layout_main, "idle,state,pulse,visible", "", on_initial_anim_press_cb, voicedata);
 
-    evas_object_geometry_get(win, NULL, NULL, &win_w, &win_h);
-    evas_object_resize(layout_main, win_w, win_h);
+    SclSize rect = g_ui->get_input_mode_size(g_ui->get_input_mode(), g_ui->get_display_mode());
+    evas_object_resize(layout_main, rect.width, rect.height);
 
     evas_object_layer_set(layout_main, 32000);
 
index 0ace520..2e6a047 100644 (file)
@@ -410,6 +410,9 @@ void CCoreEventCallback::on_set_rotation_degree(sclint degree)
     if (is_emoticon_show()) {
         ise_destroy_emoticon_layout();
     }
+    if (g_keyboard_state.layout == ISE_LAYOUT_STYLE_VOICE) {
+        ise_hide_stt_mode();
+    }
     if (g_keyboard_state.layout == ISE_LAYOUT_STYLE_EMOTICON) {
         ise_show_emoticon_layout(current_emoticon_group, degree, false, g_core.get_main_window());
     } else if (g_ui) {
@@ -417,6 +420,8 @@ void CCoreEventCallback::on_set_rotation_degree(sclint degree)
         if (input_mode) {
             if (!(strcmp(input_mode, "EMOTICON_LAYOUT")))
                 ise_show_emoticon_layout(current_emoticon_group, degree, false, g_core.get_main_window());
+            else if (!(strcmp(input_mode, "STT_3X4")))
+                ise_show_stt_mode(NATIVE_WINDOW_CAST(g_core.get_main_window()));
         }
     }
 }