From 5dd0418c3908af6d4c4d02a0fd85c20ea007ea22 Mon Sep 17 00:00:00 2001 From: Piotr Ganicz Date: Thu, 10 Dec 2015 14:33:49 +0100 Subject: [PATCH] Align the content of popups (date,month,week,time,colorpicker) This patch is to set a proper position of swallow element on the popup on TV platform. The solution for this issue is to send a signal from C++ code to the edje file (control.edc) with the information of the current platform. Depending on the platform the proper code will be running in edc file in part "elm.swallow.datetime". In colorpicker top_padding element was displayed as a white RECT, due to that fact we should change the type of it to SPACER (it is transparent). Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=14841 Reviewed by: a1.gomes, g.czajkowski Change-Id: I1a787979581cf218fdf8d8d1d630a17a620296ab Signed-off-by: Piotr Ganicz --- .../browser/inputpicker/InputPicker.cc | 6 +++++ tizen_src/ewk/efl_integration/resource/control.edc | 31 +++++++++++++--------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/tizen_src/ewk/efl_integration/browser/inputpicker/InputPicker.cc b/tizen_src/ewk/efl_integration/browser/inputpicker/InputPicker.cc index 40912d5..fe5f1437 100755 --- a/tizen_src/ewk/efl_integration/browser/inputpicker/InputPicker.cc +++ b/tizen_src/ewk/efl_integration/browser/inputpicker/InputPicker.cc @@ -687,6 +687,9 @@ void InputPicker::CreatePopupLayout(const char* title, struct tm* currentTime) { elm_datetime_value_set(picker_layout_->datePicker, currentTime); +#if defined(OS_TIZEN_TV) + elm_object_signal_emit(picker_layout_->layout,"TV","align,swallow.datetime"); +#endif #if defined(OS_TIZEN_MOBILE) evas_object_smart_callback_add( picker_layout_->datePicker, "edit,end", endEditingCallback, 0); @@ -817,6 +820,9 @@ void InputPicker::CreateTimePopupLayout(const char* title, struct tm* currentTim elm_datetime_value_set(picker_layout_->time_picker, currentTime); +#if defined(OS_TIZEN_TV) + elm_object_signal_emit(picker_layout_->layout,"TV","align,swallow.datetime"); +#endif #if defined(OS_TIZEN_MOBILE) evas_object_smart_callback_add( picker_layout_->time_picker, "edit,end", endEditingCallback, 0); diff --git a/tizen_src/ewk/efl_integration/resource/control.edc b/tizen_src/ewk/efl_integration/resource/control.edc index 6fe23e9..9f3e959 100644 --- a/tizen_src/ewk/efl_integration/resource/control.edc +++ b/tizen_src/ewk/efl_integration/resource/control.edc @@ -1,5 +1,5 @@ #define COLORSELECTOR_BG_WIDTH_INC 300 -#define COLORSELECTOR_POPUP_TOP_PADDING_HEIGHT_INC 20 +#define COLORSELECTOR_POPUP_TOP_PADDING_HEIGHT_INC 26 #define COLORSELECTOR_POPUP_HEIGHT_INC 194 #define COLORSELECTOR_POPUP_SEPARATOR_INC 1 #define COLORSELECTOR_POPUP_COLORSELECTOR_HEIGHT_INC 148 @@ -17,7 +17,7 @@ collections { } part { name: "top_padding"; scale: 1; - type: RECT; + type: SPACER; description { state: "default" 0.0; min : 0 COLORSELECTOR_POPUP_TOP_PADDING_HEIGHT_INC; max : COLORSELECTOR_BG_WIDTH_INC COLORSELECTOR_POPUP_TOP_PADDING_HEIGHT_INC; @@ -93,25 +93,30 @@ collections { rel2 { relative: 1.0 1.0; } } } - part { name: "pad_left"; - type: SPACER; - scale: 1; - description { - state: "default" 0.0; - align: 0.0 0.5; - rel1 { relative: 0.0 0.0; to: "bg"; } - rel2 { relative: 0.0 1.0; to: "bg"; } - } - } part { name: "elm.swallow.datetime"; type: SWALLOW; scale: 1; description { state: "default" 0.0; align: 0.0 0.5; - rel1 { relative: 1.0 0.0; to: "pad_left"; } + rel1 { relative: 0.0 0.0; to: "bg"; } rel2 { relative: 1.0 1.0; to: "bg"; } } + description { + state: "TV" 0.0; + align: 0.5 0.0; + fixed: 1 1; + rel1 { relative: 0.5 0.0; to: "bg"; } + rel2 { relative: 0.5 0.5; to: "bg"; } + } + } + } + programs { + program { + signal: "TV"; + source: "align,swallow.datetime"; + action: STATE_SET "TV" 0.0; + target: "elm.swallow.datetime"; } } } -- 2.7.4