From d10a4a9791c17e834f030195ec01bb621ed8613d Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Thu, 6 Oct 2016 13:47:34 +0900 Subject: [PATCH] Adjust voice layout when keyboard is ratationed Change-Id: Ifcca279bad335b89402fe8e7d0b42013d9df5f7c Signed-off-by: sungwook79.park --- src/ise-stt-mode.cpp | 11 ++++------- src/ise.cpp | 5 +++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ise-stt-mode.cpp b/src/ise-stt-mode.cpp index c6f59d6..a937741 100644 --- a/src/ise-stt-mode.cpp +++ b/src/ise-stt-mode.cpp @@ -24,6 +24,7 @@ #include #include "ise.h" +#include "utils.h" #include "ise-stt-mode.h" #include "ise-stt-option.h" @@ -35,10 +36,9 @@ #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); diff --git a/src/ise.cpp b/src/ise.cpp index 0ace520..2e6a047 100644 --- a/src/ise.cpp +++ b/src/ise.cpp @@ -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())); } } } -- 2.7.4