Overheat popup: Layout change for Korean language 75/80175/1 accepted/tizen/common/20160719.172552 accepted/tizen/mobile/20160719.060909 accepted/tizen/tv/20160719.060856 accepted/tizen/wearable/20160719.060902 submit/tizen/20160719.023708
authorchangjoo.lee <changjoo.lee@samsung.com>
Fri, 15 Jul 2016 05:03:13 +0000 (14:03 +0900)
committerchangjoo.lee <changjoo.lee@samsung.com>
Fri, 15 Jul 2016 05:03:36 +0000 (14:03 +0900)
If language type is changed to Korea, Last a few words are cut.
So add scrollable property to popup.

Change-Id: Id1296276e3006bc5a4cd7ab3f3de757d1b82bfe9
Signed-off-by: changjoo.lee <changjoo.lee@samsung.com>
src/overheat/overheat-popup.edc
src/overheat/overheat.c

index cbf3c23f63f6b0d25d3e2d944e91583d75509576..927fc87603764f99428240cf391ac3a833777a9e 100755 (executable)
@@ -38,7 +38,7 @@ collections {
        #define POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_OVERHEAT_SIZE_INC 20 20
        #define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_INC 0 69
        #define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_MIN_INC 0 161
-       #define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_OVERHEAT_MIN_INC 0 300
+       #define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_OVERHEAT_MIN_INC 200 350
 
        #define POPUP_PROGRESSBAR_2TEXT_VIEW_LAYOUT_BG_MIN_INC 0 193
        #define POPUP_PROGRESSBAR_VIEW_LAYOUT_SUBTEXT_FONT_SIZE_INC 0 32
@@ -389,31 +389,30 @@ collections {
        }
 
        group { name: "overheat_view_layout";
-          styles {
-              style { name: "overheat_processing_style";
-                base: "font=Tizen:style=Regular align=left linegap=20 font_size="POPUP_TEXT_FONT_SIZE0" color=#000000 wrap=mixed text_class=tizen";
-                tag:  "br" "\n";
-                tag:  "tab" "\t";
-             }
-          }
           parts {
              part { name: "bg";
                 type: SPACER;
                 scale: 1;
                 description { state: "default" 0.0;
-                    min: POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_OVERHEAT_MIN_INC;
-                    fixed: 1 0;
+                min: POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_OVERHEAT_MIN_INC;
+                    rel1.relative: 0.0 0.0;
+                    rel2.relative: 1.0 1.0;
+                    align: 0.0 0.0;
                 }
              }
              part { name: "pad_l_t";
                 type: SPACER;
                 scale: 1;
                 description { state: "default" 0.0;
-                    min: POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_OVERHEAT_SIZE_INC;
-                    max: POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_OVERHEAT_SIZE_INC;
-                    fixed: 1 1;
-                    rel1.relative: 0.0 0.0;
-                    rel2.relative: 0.0 1.0;
+                    min: 30 30;
+                    rel1 {
+                       to:"bg";
+                       relative: 0.0 0.0;
+                    }
+                    rel2 {
+                       to:"bg";
+                       relative: 0.0 0.0;
+                    }
                     align: 0.0 0.0;
                 }
              }
@@ -421,35 +420,49 @@ collections {
                 type: SPACER;
                 scale: 1;
                 description { state: "default" 0.0;
-                    min: POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_OVERHEAT_SIZE_INC;
-                    max: POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_OVERHEAT_SIZE_INC;
-                    fixed: 1 1;
-                    rel1.relative: 1.0 0.0;
-                    rel2.relative: 1.0 1.0;
+                    min: 30 30;
+                    rel1 {
+                       to:"bg";
+                       relative: 1.0 1.0;
+                    }
+                    rel2 {
+                       to:"bg";
+                       relative: 1.0 1.0;
+                    }
                     align: 1.0 1.0;
                 }
              }
-             part { name: "elm.text.contents1";
-                 type: TEXTBLOCK;
+             part { name: "pad_c_t";
+                type: SPACER;
+                scale: 1;
+                description { state: "default" 0.0;
+                    rel1 {
+                       to:"pad_l_t";
+                       relative: 1.0 1.0;
+                    }
+                    rel2 {
+                       to:"pad_r_t";
+                       relative: 0.0 0.0;
+                    }
+                    align: 0.0 0.0;
+                }
+             }
+             part { name: "elm.swallow.content1";
+                 type: SWALLOW;
                  scale: 1;
-                 multiline: 1;
                  description { state: "default" 0.0;
                     fixed: 0 1;
-                    min: 0 130;
+                    min: POPUP_CHECK_VIEW_LAYOUT_CONTENT_MIN_INC;
                     rel1 {
-                       relative: 1.0 0.0;
-                       to: "pad_l_t";
-                    }
-                    rel2 {
-                       relative: 0.0 1.0;
-                       to_x: "pad_r_t";
-                       to_y: "pad_l_t";
+                       relative: 1.0 1.0;
+                       to:"pad_l_t";
                     }
-                    text {
-                       style: "overheat_processing_style";
-                       min: 0 1;
+                    rel2 {
+                       relative: 0.0 0.0;
+                       to_x:"pad_r_t";
+                       to_y:"pad_l_t";
                     }
-                    align: 0.5 0.0;
+                    align: 0.0 0.0;
                  }
              }
              part { name: "processing";
@@ -459,41 +472,33 @@ collections {
                     min: POPUP_PROCESSING_SWALLOW_VIEW_LAYOUT_MIN_INC;
                     max: POPUP_PROCESSING_SWALLOW_VIEW_LAYOUT_MAX_INC;
                     rel1 {
-                       relative: 0.0 1.1;
-                       to: "elm.text.contents1";
+                       relative: 1.0 1.0;
+                       to_x: "pad_l_t";
+                       to_y: "elm.swallow.content1";
                     }
                     rel2 {
                        relative: 1.0 0.0;
-                       to_x: "pad_l_t";
-                       to_y: "pad_r_t";
+                       to_x:"pad_r_t";
                     }
                     align: 0.0 0.0;
-                    fixed: 1 1;
                 }
              }
-             part { name: "elm.text.contents2";
-                type: TEXTBLOCK;
-                scale: 1;
-                multiline: 1;
-                description { state: "default" 0.0;
+             part { name: "elm.swallow.content2";
+                 type: SWALLOW;
+                 scale: 1;
+                 description { state: "default" 0.0;
                     fixed: 0 1;
-                    min: 0 130;
                     rel1 {
                        relative: 1.0 1.0;
-                       to_x: "processing";
-                       to_y: "elm.text.contents1";
+                       to_x:"processing";
+                       to_y:"elm.swallow.content1";
                     }
                     rel2 {
                        relative: 0.0 0.0;
-                       to: "pad_r_t";
-                    }
-                    text {
-                       style: "overheat_processing_style";
-                       min: 0 1;
+                       to:"pad_r_t";
                     }
                     align: 0.0 0.0;
-                    fixed: 1 1;
-                }
+                 }
              }
           }
        }
index 33de2269746eb6c0ae67408621dd092f9dd63f47..b425d161b25e02db65a0927b2e85247716dd061c 100755 (executable)
@@ -178,6 +178,8 @@ int overheat_popup(bundle *b, const struct popup_ops *ops)
        Evas_Object *layout;
        Evas_Object *btn;
        Evas_Object *progressbar;
+       Evas_Object *scroller1, *scroller2;
+       Evas_Object *label1, *label2;
        Evas_Object *win;
        Ecore_Timer *timer;
        struct object_ops *obj;
@@ -199,10 +201,16 @@ int overheat_popup(bundle *b, const struct popup_ops *ops)
        if (!popup)
                return -ENOMEM;
 
+       /* title */
        elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
        elm_object_part_text_set(popup, "title,text", gl_text_get(0));
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
+       /* layout */
+       layout = elm_layout_add(popup);
+       elm_layout_file_set(layout, ELM_OVERHEAT_EDC, "overheat_view_layout");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
        /* cancel button */
        btn = elm_button_add(popup);
        elm_object_style_set(btn, "bottom");
@@ -220,13 +228,35 @@ int overheat_popup(bundle *b, const struct popup_ops *ops)
        /* back key */
        eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, event_back_key_up, (void*)ops);
 
-       /* layout */
-       layout = elm_layout_add(popup);
-       _D("ELM_OVERHEAT_EDC = %s", ELM_OVERHEAT_EDC);
-       elm_layout_file_set(layout, ELM_OVERHEAT_EDC, "overheat_view_layout");
-       elm_object_part_text_set(layout, "elm.text.contents1", gl_text_get(1));
-       elm_object_part_text_set(layout, "elm.text.contents2", gl_text_get(2));
-       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       /* scrollers */
+       scroller1 = elm_scroller_add(layout);
+       elm_scroller_bounce_set(scroller1, EINA_TRUE, EINA_TRUE);
+       elm_scroller_policy_set(scroller1, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
+       elm_object_part_content_set(layout, "elm.swallow.content1", scroller1);
+
+       scroller2 = elm_scroller_add(layout);
+       elm_scroller_bounce_set(scroller2, EINA_TRUE, EINA_TRUE);
+       elm_scroller_policy_set(scroller2, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
+       elm_object_part_content_set(layout, "elm.swallow.content2", scroller2);
+
+       /* labels */
+       label1 = elm_label_add(scroller1);
+       elm_object_style_set(label1, "popup/default");
+       elm_label_line_wrap_set(label1, ELM_WRAP_MIXED);
+       elm_object_text_set(label1, gl_text_get(1));
+       evas_object_size_hint_weight_set(label1, EVAS_HINT_EXPAND, 0.0);
+       evas_object_size_hint_align_set(label1, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(label1);
+       elm_object_content_set(scroller1, label1);
+
+       label2 = elm_label_add(scroller2);
+       elm_object_style_set(label2, "popup/default");
+       elm_label_line_wrap_set(label2, ELM_WRAP_MIXED);
+       elm_object_text_set(label2, gl_text_get(2));
+       evas_object_size_hint_weight_set(label2, EVAS_HINT_EXPAND, 0.0);
+       evas_object_size_hint_align_set(label2, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(label2);
+       elm_object_content_set(scroller2, label2);
 
        /* progressbar */
        progressbar = elm_progressbar_add(layout);
@@ -237,12 +267,11 @@ int overheat_popup(bundle *b, const struct popup_ops *ops)
        elm_object_part_content_set(layout, "processing", progressbar);
        timer = ecore_timer_add(0.3, progressbar_timer_cb, popup);
 
-       elm_object_content_set(popup, layout);
-
        evas_object_data_set(popup, "progressbar", progressbar);
        evas_object_data_set(popup, "timer", timer);
        evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, progressbar_popup_del_cb, timer);
 
+       elm_object_content_set(popup, layout);
        evas_object_show(popup);
        obj->popup = popup;