Align the content of popups (date,month,week,time,colorpicker)
authorPiotr Ganicz <p.ganicz@samsung.com>
Thu, 10 Dec 2015 13:33:49 +0000 (14:33 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
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 <p.ganicz@samsung.com>
tizen_src/ewk/efl_integration/browser/inputpicker/InputPicker.cc
tizen_src/ewk/efl_integration/resource/control.edc

index 40912d5..fe5f143 100755 (executable)
@@ -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);
index 6fe23e9..9f3e959 100644 (file)
@@ -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";
             }
         }
     }