Display the file name on the left top of progress bar 44/101644/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 2 Dec 2016 00:24:09 +0000 (09:24 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 2 Dec 2016 00:25:59 +0000 (09:25 +0900)
Change-Id: I48b725ff1c2fa6a44b5bc1045bd8e2e9ae70458d
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
data/edc/bt-share-layout.edc
src/bt-share-ui-view.c

index e5713f18b40c64f463a5fcf2bdbef9ab3668d92d..c2ac38f921b824e133f1b9a3ebb53248e672ff09 100644 (file)
 
 #define POPUP_TEXT_FONT_SIZE1 30
 #define POPUP_TEXT_FONT_SIZE2 24
-#define POPUP_PROGRESSBAR_2TEXT_VIEW_LAYOUT_BG_MIN_INC 0 190
+#define POPUP_PROGRESSBAR_2TEXT_VIEW_LAYOUT_BG_MIN_INC 0 (190-32)
 #define POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC 15 27
 #define POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_SIZE_INC 0 38
 #define POPUP_PROGRESSBAR_VIEW_LAYOUT_SUBTEXT_FONT_SIZE_INC 0 32
-#define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_INC 0 7
+#define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_INC 0 69
+#define POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_MIN_INC 0 161
 
 #define POPUP_PROCESSING_VIEW_LAYOUT_BG_MIN_INC 0 90
 #define POPUP_PROCESSING_SWALLOW_VIEW_LAYOUT_MIN_INC 36 36
@@ -262,64 +263,210 @@ collections {
                        }
                }
        }
-       group { name: "gl_custom_item";
+
+       group { name: "popup_text_progressbar_view_layout";
+          styles {
+             style { name: "popup_progress_style";
+                base: "font=Tizen:style=Regular align=right font_size="14" color=#000000 wrap=mixed ellipsis=1.0 text_class=tizen";
+                tag:  "br" "\n";
+                tag:  "tab" "\t";
+             }
+          }
           parts {
-             part { name: "base";
+             part { name: "bg";
                 type: SPACER;
                 scale: 1;
                 description { state: "default" 0.0;
-                   min: 0 120; //GENLIST_ITEM_1LINE_HEIGHT
+                   min: POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_MIN_INC;
+                   fixed: 1 0;
                 }
              }
-             part { name: "left_padding";
+             part { name: "pad_l_t";
                 type: SPACER;
                 scale: 1;
                 description { state: "default" 0.0;
-                   min: 24 0;
+                   min: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                   max: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                   fixed: 1 1;
+                   rel2.relative: 0.0 0.0;
                    align: 0.0 0.0;
-                   rel1 { to: "base"; relative: 0.0 0.0; }
-                   rel2 { to: "base"; relative: 0.0 1.0; }
                 }
              }
-             part { name: "right_padding";
+             part { name: "pad_r_t";
                 type: SPACER;
                 scale: 1;
                 description { state: "default" 0.0;
-                   min: 24 0;
-                   align: 1.0 0.0;
-                   rel1 { to: "base"; relative: 1.0 0.0; }
-                   rel2 { to: "base"; relative: 1.0 1.0; }
+                   min: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                   max: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                   fixed: 1 1;
+                   rel1.relative: 1.0 1.0;
+                   align: 1.0 1.0;
                 }
              }
-             part { name: "top_padding";
-                type: SPACER;
+             part { name: "elm.text.description";
+                type: TEXTBLOCK;
                 scale: 1;
                 description { state: "default" 0.0;
-                   min: 0 10;
+                   fixed: 0 1;
+                   min: POPUP_PROGRESSBAR_VIEW_LAYOUT_TEXT_FONT_SIZE_INC;
+                   rel1 {
+                      relative: 1.0 1.0;
+                      to: "pad_l_t";
+                   }
+                   rel2 {
+                      relative: 0.0 1.0;
+                      to_x: "pad_r_t";
+                      to_y: "pad_l_t";
+                   }
+                   text {
+                      style: "popup_processing_style";
+                      min: 0 1;
+                   }
                    align: 0.0 0.0;
-                   rel1 { to_x: "left_padding"; to_y: "base"; relative: 1.0 0.0; }
-                   rel2 { to_x: "right_padding"; to_y: "base"; relative: 0.0 0.0; }
                 }
              }
-             part { name: "elm.swallow.content";
-                type: SWALLOW;
+             part { name: "progressbar_bg";
+                type: SPACER;
                 scale: 1;
                 description { state: "default" 0.0;
-                   align: 0.5 0.0;
-                   rel1 { to_x: "left_padding"; to_y: "top_padding"; relative: 1.0 1.0; }
-                   rel2 { to_x: "right_padding"; to_y: "bottom_padding"; relative: 0.0 1.0; }
+                   fixed: 0 1;
+                   min: POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_INC;
+                   rel1 {
+                      relative: 1.0 1.0;
+                      to_x: "pad_l_t";
+                      to_y: "elm.text.description";
+                   }
+                   rel2 {
+                      relative: 0.0 1.0;
+                      to_x: "pad_r_t";
+                      to_y: "elm.text.description";
+                   }
+                   align: 0.0 0.0;
                 }
              }
-             part { name: "bottom_padding";
-                type: SPACER;
+             part { name: "progressbar";
+                type: SWALLOW;
                 scale: 1;
                 description { state: "default" 0.0;
-                   min: 0 10;
-                   align: 0.5 1.0;
-                   rel1 { to: "base"; relative: 0.0 1.0; }
-                   rel2 { to: "base"; relative: 1.0 1.0; }
+                   fixed: 0 1;
+                   rel1.to: "progressbar_bg";
+                   rel2.to: "progressbar_bg";
                 }
              }
           }
        }
+
+       group {
+                name: "text_progressbar_view_layout";
+                styles {
+                        style {
+                                name: "popup_processing_style";
+                                base: "font=Tizen:style=Regular font_size="POPUP_TEXT_FONT_SIZE1" align=left color=#070707FF wrap=mixed text_class=tizen";
+                                // base: "font=Tizen:style=Regular align=left font_size="POPUP_TEXT_FONT_SIZE1" color=#FFFFFF color_class=T123 wrap=mixed ellipsis=1.0 text_class=T123";
+                                tag:  "br" "\n";
+                                tag:  "tab" "\t";
+                        }
+                        style {
+                                name: "popup_subtext_style";
+                                base: "font=Tizen:style=Regular font_size="POPUP_TEXT_FONT_SIZE2" align=left color=#070707FF wrap=mixed text_class=tizen";
+                                // base: "font=Tizen:style=Regular align=left font_size="POPUP_TEXT_FONT_SIZE2" color=#FFFFFF color_class=T024 wrap=mixed ellipsis=1.0 text_class=T024";
+                                tag:  "br" "\n";
+                                tag:  "tab" "\t";
+                        }
+                }
+                parts {
+                        part {
+                                name: "bg";
+                                type: SPACER;
+                                scale: 1;
+                                description {
+                                        state: "default" 0.0;
+                                        min: POPUP_PROGRESSBAR_2TEXT_VIEW_LAYOUT_BG_MIN_INC;
+                                        fixed: 1 0;
+                                }
+                        }
+                        part { name: "pad_l_t";
+                                type: SPACER;
+                                scale: 1;
+                                description {
+                                        state: "default" 0.0;
+                                        min: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                                        max: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                                        fixed: 1 1;
+                                        rel2.relative: 0.0 0.0;
+                                        align: 0.0 0.0;
+                                }
+                        }
+                        part { name: "pad_r_t";
+                                type: SPACER;
+                                scale: 1;
+                                description {
+                                        state: "default" 0.0;
+                                        min: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                                        max: POPUP_PROGRESSBAR_VIEW_LAYOUT_PADDING_INC;
+                                        fixed: 1 1;
+                                        rel1.relative: 1.0 1.0;
+                                        align: 1.0 1.0;
+                                }
+                        }
+                       part { name: "elm.text.description";
+                                type: TEXTBLOCK;
+                                scale: 1;
+                                description {
+                                        state: "default" 0.0;
+                                        min: POPUP_PROGRESSBAR_VIEW_LAYOUT_SUBTEXT_FONT_SIZE_INC;
+                                        fixed: 0 1;
+                                        rel1 {
+                                                relative: 1.0 1.0;
+                                                to: "pad_l_t";
+                                        }
+                                        rel2 {
+                                                relative: 0.0 1.0;
+                                                to_x: "pad_r_t";
+                                                to_y: "pad_l_t";
+                                        }
+                                        text {
+                                                style: "popup_subtext_style";
+                                                min: 0 1;
+                                        }
+                                        align: 0.0 0.0;
+                                }
+                        }
+                       part {
+                                name: "progressbar_bg";
+                                type: SPACER;
+                                scale: 1;
+                                description {
+                                        state: "default" 0.0;
+                                        fixed: 0 1;
+                                        min: POPUP_PROGRESSBAR_VIEW_LAYOUT_BG_INC;
+                                        rel1 {
+                                                relative: 1.0 1.0;
+                                                to_x: "pad_l_t";
+                                                to_y: "elm.text.description";
+                                                offset: 0 7;
+
+                                        }
+                                        rel2 {
+                                                relative: 0.0 1.0;
+                                                to_x: "pad_r_t";
+                                                to_y: "elm.text.description";
+                                        }
+                                        align: 0.0 0.0;
+                                }
+                        }
+                        part {
+                                name: "progressbar";
+                                type: SWALLOW;
+                                scale: 1;
+                                description {
+                                        state: "default" 0.0;
+                                        fixed: 0 1;
+                                        rel1.to: "progressbar_bg";
+                                        rel2.to: "progressbar_bg";
+                                }
+                        }
+                }
+        }
+
 }
index e6b29988ec2fdea4d65919d2c1c6fafebbdaca77..89e2bf39d5ceaa697e4aa93e7d2d263d2d2f4b40 100644 (file)
@@ -288,7 +288,7 @@ static Evas_Object *__bt_tr_progress_icon_get(void *data, Evas_Object *obj,
                if (ad->progress_layout == NULL) {
                        DBG("Creating new progress layout!!!");
                        progress_layout = elm_layout_add(obj);
-                       elm_layout_file_set(progress_layout, EDJFILE, "gl_custom_item");
+                       elm_layout_file_set(progress_layout, EDJFILE, "popup_text_progressbar_view_layout");
                        evas_object_size_hint_align_set(progress_layout, EVAS_HINT_FILL,
                                                                                EVAS_HINT_FILL);
                        evas_object_size_hint_weight_set(progress_layout, EVAS_HINT_EXPAND,
@@ -317,20 +317,21 @@ static Evas_Object *__bt_tr_progress_icon_get(void *data, Evas_Object *obj,
                        progressbar = ad->progressbar;
                }
 
-               elm_object_part_content_set(progress_layout, "elm.swallow.content", progressbar);
-
-               elm_progressbar_value_set(progressbar,
-                               (double) transfer_info->percentage / 100);
-
-               elm_object_signal_emit(progressbar, "elm,bottom,text,show", "elm");
-
                markup_text = elm_entry_utf8_to_markup(transfer_info->filename);
                DBG_SECURE("Filename: %s", markup_text);
 
                DBG("Filename: %s", markup_text);
-               elm_object_part_text_set(progressbar, "elm.text.top.right", markup_text);
+
+               elm_object_part_text_set(progress_layout, "elm.text.description", markup_text);
                g_free(markup_text);
 
+               elm_object_part_content_set(progress_layout, "progressbar", progressbar);
+
+               elm_progressbar_value_set(progressbar,
+                               (double) transfer_info->percentage / 100);
+
+               elm_object_signal_emit(progressbar, "elm,bottom,text,show", "elm");
+
                snprintf(buff, BT_STR_PROGRESS_MAX_LEN - 1 , "%d%%", transfer_info->percentage);
                elm_object_part_text_set(progressbar, "elm.text.bottom.left", buff);