TizenRefApp-8046 Implement ThreadListViewItem class part 2 80/117280/4
authorOleksander Kostenko <o.kostenko@samsung.com>
Thu, 2 Mar 2017 17:04:19 +0000 (19:04 +0200)
committerOleksander Kostenko <o.kostenko@samsung.com>
Mon, 6 Mar 2017 11:31:32 +0000 (13:31 +0200)
Change-Id: I754711641a685ad8f2f5e6e39ed4f7d091243b59
Signed-off-by: Oleksander Kostenko <o.kostenko@samsung.com>
res/edje/icons.edc
res/edje/thread_genlist_theme.edc
src/Common/View/src/ListItem.cpp
src/MsgThread/View/src/ThreadListViewItem.cpp

index 210a83b8758f6593b0d267125401604aa1330cd6..265da798a2bf96d30aa41785bf6ce3ec42ac2046 100755 (executable)
@@ -1,5 +1,10 @@
 #include "macros.inl"
 
+#define BADGE_HEIGHT    32
+#define BADGE_MIN_WIDTH 32
+#define BADGE_MAX_WIDTH 60
+#define TEXT_SIZE       24
+
 collections {
    BASE_SCALE;
    group {
@@ -111,16 +116,16 @@ collections {
             description {
                state: "default" 0.0;
                fixed: 0 1;
-               min: 30 30;
-               max: 30 30;
+               min: BADGE_MIN_WIDTH BADGE_HEIGHT;
+               max: BADGE_MAX_WIDTH BADGE_HEIGHT;
                image {
                         normal:"list_noti_new_bg.#.png";
                }
-               color: 255 255 255 255;
+               color: 255 106 0 255;
             }
          }
-         PADDING_LEFT("pad.left", 13);
-         PADDING_RIGHT("pad.right", 13);
+         PADDING_LEFT("pad.left", 5);
+         PADDING_RIGHT("pad.right", 5);
          part { name: "elm.text.count";
             type: TEXT;
             mouse_events: 0;
@@ -135,10 +140,10 @@ collections {
                   relative: 0.0 0.5;
                   to_x: "pad.right";
                }
-               color: 250 250 250 255;
+               color: 255 255 255 255;
                text {
                   font: "Tizen:style=Regular";
-                  size: 32;
+                  size: TEXT_SIZE;
                   ellipsis: 0.0;
                   align: 0.5 0.5;
                   min: 1 0;
index 8f214347f15c41064cfd0da4a0984b63340b965f..6c569aff98af2f6e0d81acfc55eb823d0ded382e 100755 (executable)
@@ -1,3 +1,6 @@
+/* This file is modified version of .edc from the following commit: I333156f806d85fd67d8c22c70b89c4886284d15e
+"popup: remove popup_default _title_style to following 2.3.1" */
+
 #include "macros.inl"
 
 #define LIST_SLIDING_SPEED                                 0.009
@@ -5,84 +8,6 @@
 #define LIST_HIGHLIGHT_DURATION_TIME                       0.2
 #define LIST_UNHIGHLIGHT_DURATION_TIME                     0.2
 
- #define DESC_FROM_L( PARAM ) \
-   description { state: "default" 0.0; \
-      fixed: 1 0; \
-      align: 0.0 0.5; \
-      rel2.relative: 0.0 1.0; \
-      PARAM \
-   }
-
- #define DESC_FROM_R( PARAM ) \
-   description { state: "default" 0.0; \
-      fixed: 1 0; \
-      align: 1.0 0.5; \
-      rel1.relative: 1 0; \
-      PARAM \
-   }
-
- #define DESC_FROM_T( PARAM ) \
-   description { state: "default" 0.0; \
-      fixed: 0 1; \
-      align: 0.5 0.0; \
-      rel2.relative: 1.0 0.0; \
-      PARAM \
-   }
-
- #define DESC_FROM_B( PARAM ) \
-   description { state: "default" 0.0; \
-      fixed: 0 1; \
-      rel1.relative: 0.0 1.0; \
-      align: 0.5 1.0; \
-      PARAM \
-   }
-
-#define DESC_LRTB( LEFT, RIGHT, TOP, BOTTOM, PARAM ) \
-   description { state: "default" 0.0; \
-      rel1 { \
-         relative: 1 1; \
-         to_x: LEFT; \
-         to_y: TOP; \
-      } \
-      rel2 { \
-         relative: 0 0; \
-         to_x: RIGHT; \
-         to_y: BOTTOM; \
-      } \
-      PARAM \
-   }
-
-#define DESC_L( LEFT, PARAM ) \
-   description { state: "default" 0.0; \
-      align: 0 0.5; \
-      fixed: 1 0; \
-      rel1 { \
-         relative: 1 0; \
-         to_x: LEFT; \
-      } \
-      rel2 { \
-         relative: 1 1; \
-         to_x: LEFT; \
-      } \
-      PARAM \
-   }
-
-#define DESC_LRB( LEFT, RIGHT, BOTTOM, PARAM ) \
-   description { state: "default" 0.0; \
-      align: 0.5 1; \
-      rel1 { \
-         relative: 1 0; \
-         to_x: LEFT; \
-         to_y: BOTTOM; \
-      } \
-      rel2 { \
-         relative: 0 0; \
-         to_x: RIGHT; \
-         to_y: BOTTOM; \
-      } \
-      PARAM \
-   }
-
 #define PART(TYPE, NAME, DESCRIPION) \
    part { name: NAME; \
       scale: 1; \
       DESCRIPION \
    }
 
-#define PROLOG_LIST \
-   data.item: "treesize" 0; \
-   data.item: "flips" "elm.flip.icon elm.flip.content"; \
-
-#define PART_CENTER_CHECK \
-   PART(SWALLOW, "elm.swallow.center_check", \
-      description { state: "default" 0.0; \
-         align: 0.5 0.5; \
-      } \
-   ) \
-
-#define PART_LIST_BG \
-   PART(RECT, "bg",  \
-      description { state: "default" 0.0; \
-         color: 0 0 0 0; \
-      } \
-   )
-
-#define PART_LIST_EVENT \
-   PART(RECT, "event_block", \
-      mouse_events: 0; \
-      repeat_events: 1; \
-      description { state: "default" 0.0; \
-         color: 0 0 0 0; \
-         visible: 0; \
-      } \
-      description { state: "blocked" 0.0; \
-         color: 0 0 0 0; \
-         visible: 1; \
-      } \
-   )
-
-#define PART_LIST_PADDINGS_FOCUS_BG(LEFT_SIZE, RIGHT_SIZE, TOP_SIZE, BOTTOM_SIZE, HIGHLIGHTED_TOP_SIZE, HIGHLIGHTED_BOTTOM_SIZE, BOTTOM_SIZE_1, FOCUS_BG_TOP_SIZE, FOCUS_BG_BOTTOM_SIZE) \
-   PART(SPACER, "elm.padding.left", \
-      DESC_FROM_L( \
-         min: LEFT_SIZE 0; \
-         max: LEFT_SIZE -1; \
-      ) \
-   ) \
-   PART(SPACER, "elm.padding.right", \
-      DESC_FROM_R( \
-         min: RIGHT_SIZE 0; \
-         max: RIGHT_SIZE -1; \
-      ) \
-   ) \
-   PART(SPACER, "elm.padding.top", \
-      DESC_FROM_T( \
-         min: 0 TOP_SIZE; \
-         max: -1 TOP_SIZE; \
-      ) \
-      description { state: "highlighting" 0.0; \
-         inherit: "default" 0.0; \
-      } \
-      description { state: "highlighted" 0.0; \
-         inherit: "highlighting" 0.0; \
-         min: 0 HIGHLIGHTED_TOP_SIZE; \
-         max: -1 HIGHLIGHTED_TOP_SIZE; \
-      } \
-   ) \
-   PART(SPACER, "elm.padding.bottom", \
-      DESC_FROM_B( \
-         min: 0 BOTTOM_SIZE; \
-         max: -1 BOTTOM_SIZE; \
-      ) \
-      description { state: "highlighting" 0.0; \
-         inherit: "default" 0.0; \
-      } \
-      description { state: "highlighted" 0.0; \
-         inherit: "highlighting" 0.0; \
-         min: 0 HIGHLIGHTED_BOTTOM_SIZE; \
-         max: -1 HIGHLIGHTED_BOTTOM_SIZE; \
-      } \
-   ) \
-   PART(RECT, "elm.padding.focus_bg.top", \
-      DESC_FROM_T( \
-         min: 0 FOCUS_BG_TOP_SIZE; \
-         max: -1 FOCUS_BG_TOP_SIZE; \
-         color: 0 0 0 0; \
-      ) \
-   ) \
-   PART(RECT, "elm.padding.focus_bg.bottom", \
-      DESC_FROM_B( \
-         min: 0 FOCUS_BG_BOTTOM_SIZE; \
-         max: -1 FOCUS_BG_BOTTOM_SIZE; \
-         color: 0 0 0 0; \
-      ) \
-   ) \
-   PART(SPACER, "elm.padding.bottom.1", \
-      DESC_FROM_B( \
-         min: 0 BOTTOM_SIZE_1; \
-         max: -1 BOTTOM_SIZE_1; \
-      ) \
-   )
 
 #define SCRIPT_START_SLIDE \
 script { \
@@ -219,9 +51,9 @@ script { \
    } \
    public slide_first_anim(val, Float:pos) { \
       if (get_disabled()) \
-         set_tween_state(PART:"elm.text", pos, "slide_disabled", 0.0, "slide_1_disabled", 0.0); \
+         set_tween_state(PART:"elm.text.sliding", pos, "slide_disabled", 0.0, "slide_1_disabled", 0.0); \
       else \
-         set_tween_state(PART:"elm.text", pos, "slide", 0.0, "slide_1", 0.0); \
+         set_tween_state(PART:"elm.text.sliding", pos, "slide", 0.0, "slide_1", 0.0); \
       if (!get_highlighted()) { \
          slide_stop(); \
       } else if (pos >= 1.0) { \
@@ -231,9 +63,9 @@ script { \
    } \
    public slide_second_anim(val, Float:pos) { \
       if (get_disabled()) \
-         set_tween_state(PART:"elm.text", pos, "slide_2_disabled", 0.0, "disabled", 0.0); \
+         set_tween_state(PART:"elm.text.sliding", pos, "slide_2_disabled", 0.0, "disabled", 0.0); \
       else \
-         set_tween_state(PART:"elm.text", pos, "slide_2", 0.0, "default", 0.0); \
+         set_tween_state(PART:"elm.text.sliding", pos, "slide_2", 0.0, "default", 0.0); \
       if (pos >= 1.0) \
          slide_stop(); \
    } \
@@ -247,9 +79,9 @@ script { \
       check_size(); \
       if (get_int(g_sliding_start)) { \
       if (get_disabled()) \
-         set_state(PART:"elm.text", "slide_disabled", 0.0); \
+         set_state(PART:"elm.text.sliding", "slide_disabled", 0.0); \
       else \
-         set_state(PART:"elm.text", "slide", 0.0); \
+         set_state(PART:"elm.text.sliding", "slide", 0.0); \
          get_duration(); \
          custom_state(PART:"elm.padding.slide.end", "default", 0.0); \
          set_state_val(PART:"elm.padding.slide.end", STATE_REL1_OFFSET, get_int(g_text_size), 0); \
@@ -268,14 +100,14 @@ script { \
          set_int(g_anim_id, 0); \
       } \
       if (get_disabled()) \
-         set_state(PART:"elm.text", "disabled", 0.0); \
+         set_state(PART:"elm.text.sliding", "disabled", 0.0); \
       else \
-         set_state(PART:"elm.text", "default", 0.0); \
+         set_state(PART:"elm.text.sliding", "default", 0.0); \
       set_int(g_sliding_start, 0); \
    } \
    public check_size() { \
       new x, y, w, w1, h; \
-      get_geometry(PART:"elm.text", x, y, w, h); \
+      get_geometry(PART:"elm.text.sliding", x, y, w, h); \
       get_geometry(PART:"clipper.text", x, y, w1, h); \
       set_int(g_text_size, w1); \
       if (w1 > 0 && w >= w1) \
@@ -285,7 +117,7 @@ script { \
    } \
    public get_duration() { \
       new x, y, w, w1, h; \
-      get_geometry(PART:"elm.text", x, y, w, h); \
+      get_geometry(PART:"elm.text.sliding", x, y, w, h); \
       get_geometry(PART:"clipper.text", x, y, w1, h); \
       set_float(g_duration_1, w * LIST_SLIDING_SPEED); \
       set_float(g_duration_2, w1 * LIST_SLIDING_SPEED); \
@@ -309,20 +141,6 @@ script { \
       TARGET \
    }
 
-#define PROGRAM_LIST_DISABLE( TARGET ) \
-   program { name: "enabled"; \
-      signal: "elm,state,enabled"; \
-      source: "elm"; \
-      action: STATE_SET "default" 0.0; \
-      TARGET \
-   } \
-   program { name: "disabled"; \
-      signal: "elm,state,disabled"; \
-      source: "elm"; \
-      action: STATE_SET "disabled" 0.0; \
-      TARGET \
-   }
-
 #define PROGRAM_LIST_DISABLE_SLIDE( TARGET ) \
    program { name: "enabled"; \
       signal: "elm,state,enabled"; \
@@ -349,20 +167,6 @@ script { \
       } \
    }
 
-#define PROGRAM_LIST_SELECT( TARGET ) \
-   program { name: "selected"; \
-      signal: "elm,state,selected"; \
-      source: "elm"; \
-      action: STATE_SET "selected" 0.0; \
-      TARGET \
-   } \
-   program { name: "unselected"; \
-      signal: "elm,state,unselected"; \
-      source: "elm"; \
-      action: STATE_SET "default" 0.0; \
-      TARGET \
-   }
-
 #define PROGRAM_LIST_HIGHLIGHT(TARGET) \
    program { name: "text_highlight"; \
       signal: "elm,state,highlighted"; \
@@ -434,22 +238,6 @@ script { \
       action: RUN_PLUGIN "touch_sound"; \
    }
 
-#define PROGRAM_LIST_TEXT_SLIDE \
-   program { name: "slide_start"; \
-      source: "elm"; \
-      signal: "elm,action,title,slide,start"; \
-      script { \
-         slide_start(0); \
-      } \
-   } \
-   program { name: "text_slide_stop"; \
-      source: "elm"; \
-      signal: "elm,action,title,slide,stop"; \
-      script { \
-         slide_stop(); \
-      } \
-   }
-
 #define PROGRAM_LIST_EVENT \
    program { name: "content_event_disable"; \
       signal: "elm,state,content_event,disable"; \
@@ -470,143 +258,6 @@ script { \
       } \
    }
 
-#define PARAM_TEXT(STYLE, PARAM) \
-   align: 0.5 0.5; \
-   text { \
-      min: 0 1; \
-      max: 1 1; \
-      ellipsis: -1.0; \
-      fade_ellipsis: 1.0; \
-      style: STYLE; \
-      PARAM \
-   }
-
-#define PARAM_SUB_TEXT(STYLE, PARAM) \
-   align: 0.5 1.0; \
-   text { \
-      min: 0 1; \
-      max: 1 1; \
-      style: STYLE; \
-      PARAM \
-   }
-
-#define PART_MAIN_TEXT(NAME, LEFT, RIGHT, TOP, BOTTOM) \
-   PART(SPACER, "elm.padding.slide.end", \
-      DESC_L(RIGHT, \
-         fixed: 1 0; \
-         min: 0 0; \
-         max: 0 -1; \
-      ) \
-   ) \
-   PART(RECT, "clipper.text", \
-      DESC_LRTB(LEFT, RIGHT, TOP, BOTTOM, \
-      ) \
-   ) \
-   PART(TEXTBLOCK, NAME, \
-      clip_to: "clipper.text"; \
-      DESC_LRTB(LEFT, RIGHT, TOP, BOTTOM, \
-         fixed: 1 0; \
-         min: 0 LIST_TEXT_MAIN_HEIGHT_INC; \
-         PARAM_TEXT("list_text_main_normal",) \
-      ) \
-      description { state: "disabled" 0.0; \
-         inherit: "default" 0.0; \
-         text.style: "list_text_main_disabled"; \
-      } \
-      description { state: "slide" 0.0; \
-         inherit: "default" 0.0; \
-         align: 0.0 0.5; \
-         rel1 { \
-            relative: 1.0 1.0; \
-            to_x: LEFT; \
-            to_y: TOP; \
-         } \
-         rel2 { \
-            relative: 1.0 0.0; \
-            to_x: LEFT; \
-            to_y: BOTTOM; \
-         } \
-         text.min: 1 1; \
-      } \
-      description { state: "slide_1" 0.0; \
-         inherit: "default" 0.0; \
-         align: 1.0 0.5; \
-         rel1 { \
-            relative: 1.0 1.0; \
-            to_x: LEFT; \
-            to_y: TOP; \
-         } \
-         rel2 { \
-            relative: 1.0 0.0; \
-            to_x: LEFT; \
-            to_y: BOTTOM; \
-         } \
-         text.min: 1 1; \
-      } \
-      description { state: "slide_2" 0.0; \
-         inherit: "default" 0.0; \
-         align: 0.0 0.5; \
-         rel1 { \
-            relative: 0.0 1.0; \
-            to_x: RIGHT; \
-            to_y: TOP; \
-         } \
-         rel2 { \
-            relative: 0.0 0.0; \
-            to_x: "elm.padding.slide.end"; \
-            to_y: BOTTOM; \
-         } \
-      } \
-      description { state: "slide_disabled" 0.0; \
-         inherit: "disabled" 0.0; \
-         align: 0.0 0.5; \
-         rel1 { \
-            relative: 1.0 1.0; \
-            to_x: LEFT; \
-            to_y: TOP; \
-         } \
-         rel2 { \
-            relative: 1.0 0.0; \
-            to_x: LEFT; \
-            to_y: BOTTOM; \
-         } \
-         text.min: 1 1; \
-      } \
-      description { state: "slide_1_disabled" 0.0; \
-         inherit: "disabled" 0.0; \
-         align: 1.0 0.5; \
-         rel1 { \
-            relative: 1.0 1.0; \
-            to_x: LEFT; \
-            to_y: TOP; \
-         } \
-         rel2 { \
-            relative: 1.0 0.0; \
-            to_x: LEFT; \
-            to_y: BOTTOM; \
-         } \
-         text.min: 1 1; \
-      } \
-      description { state: "slide_2_disabled" 0.0; \
-         inherit: "disabled" 0.0; \
-         align: 0.0 0.5; \
-         rel1 { \
-            relative: 0.0 1.0; \
-            to_x: RIGHT; \
-            to_y: TOP; \
-         } \
-         rel2 { \
-            relative: 0.0 0.0; \
-            to_x: "elm.padding.slide.end"; \
-            to_y: BOTTOM; \
-         } \
-      } \
-      description { state: "pressed" 0.0; \
-         inherit: "default" 0.0; \
-         text.style: "list_text_main_press"; \
-      } \
-   )
-
 #define LIST_TEXT_MAIN_SIZE_INC                            36
 #define LIST_TEXT_SUB_SIZE_INC                             24
 
@@ -627,111 +278,575 @@ styles {
       STYLE_TAG_MATCH
    }
    style { name: "list_text_sub_normal";
-    base: "font=Tizen:weight=Normal:width=Condensed font_size="LIST_TEXT_SUB_SIZE_INC" color=#b3b3b3ff text_class=tizen";
+    base: "font=Tizen:weight=Normal:width=Condensed font_size="LIST_TEXT_SUB_SIZE_INC" color=#fafafa text_class=tizen wrap=mixed ellipsis=1 align=center";
       STYLE_TAG_MATCH
    }
+
    style { name: "list_text_sub_press";
-      base: "font=Tizen:weight=Normal:width=Condnesed font_size="LIST_TEXT_SUB_SIZE_INC" color=b3b3b3ff text_class=tizen";
+    base: "font=Tizen:weight=Normal:width=Condensed font_size="LIST_TEXT_SUB_SIZE_INC" color=#fafafa text_class=tizen wrap=mixed ellipsis=1 align=center";
       STYLE_TAG_MATCH
    }
+
    style { name: "list_text_sub_disabled";
-    base: "font=Tizen:weight=Normal:width=Condensed font_size="LIST_TEXT_SUB_SIZE_INC" color=#b3b3b366 text_class=tizen";
+    base: "font=Tizen:weight=Normal:width=Condensed font_size="LIST_TEXT_SUB_SIZE_INC" color=#fafafa text_class=tizen wrap=mixed ellipsis=1 align=center";
       STYLE_TAG_MATCH
    }
 }
 
-#define LIST_PADDING_LEFT_SIZE_INC                         30
-#define LIST_PADDING_RIGHT_SIZE_INC                        30
+#define LIST_PADDING_LEFT_SIZE_INC                         33
+#define LIST_PADDING_RIGHT_SIZE_INC                        33
 
 #define LIST_3LINE_PADDING_TOP_SIZE_INC                    41
 #define LIST_3LINE_PADDING_BOTTOM_SIZE_INC                 41
-#define LIST_3LINE_PADDING_HIGHLIGHTED_TOP_SIZE_INC        9
-#define LIST_3LINE_PADDING_HIGHLIGHTED_BOTTOM_SIZE_INC     73
-#define LIST_3LINE_PADDING_SUB_TEXT_BOTTOM_SIZE_INC        9
+#define LIST_3LINE_PADDING_HIGHLIGHTED_TOP_SIZE_INC        4
+#define LIST_3LINE_PADDING_HIGHLIGHTED_BOTTOM_SIZE_INC     99
+#define LIST_3LINE_PADDING_SUB_TEXT_BOTTOM_SIZE_INC        0
 
-#define LIST_TEXT_MAIN_HEIGHT_INC                          47
+#define MAX_TEXT_LEN                                       228
+#define MAX_TEXT_HEIGHT                                    47
 #define LIST_TEXT_SUB_HEIGHT_INC                           32
+#define PADDING_WIDTH                                      6
+#define MAX_MAIN_TEXT_WIDTH                                294
 
 collections {
    BASE_SCALE
    group { name: "elm/genlist/item/msg_thread/default";
 
-      PROLOG_LIST
       SCRIPT_START_SLIDE
-      data.item: "texts" "elm.text elm.text.1 elm.text.2";
-      data.item: "contents" "elm.swallow.center_check elm.icon";
+      data.item: "texts" "elm.text.sliding elm.text elm.text.1 elm.text.2";
+      data.item: "contents" "elm.icon elm.swallow.center_check elm.icon2";
       data.item: "vi_effect" "on";
+      data.item: "treesize" 0;
+      data.item: "flips" "elm.flip.icon elm.flip.content";
 
       parts {
-         PART_LIST_BG
-         PART_LIST_PADDINGS_FOCUS_BG(
-         LIST_PADDING_LEFT_SIZE_INC, LIST_PADDING_RIGHT_SIZE_INC,
-         LIST_3LINE_PADDING_TOP_SIZE_INC, LIST_3LINE_PADDING_BOTTOM_SIZE_INC,
-         LIST_3LINE_PADDING_HIGHLIGHTED_TOP_SIZE_INC, LIST_3LINE_PADDING_HIGHLIGHTED_BOTTOM_SIZE_INC, LIST_3LINE_PADDING_SUB_TEXT_BOTTOM_SIZE_INC,
-         0, 0
-         )
-         PART_MAIN_TEXT("elm.text",
-         "elm.padding.left", "elm.padding.right", "elm.padding.top", "elm.padding.bottom"
-         )
-
-         PART(SWALLOW, "elm.icon", DESC_L("elm.text",
-         fixed: 1 0;
-         min: 0 0;
-         max: 20 20;
-         ))
-
-         PART(RECT, "clipper.sub_text",
-         DESC_LRTB("elm.padding.left", "elm.padding.right", "elm.padding.top", "elm.padding.bottom.1",
-         visible: 0;
-         )
-         description { state: "highlighting" 0.0;
-            visible: 1;
-            color: 0 0 0 0;
+         part {
+            name: "bg";
+            type: RECT;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               color: 0 0 0 0;
+               min: 360 150;
+               max: 360 150;
+            }
          }
-         description { state: "highlighted" 0.0;
-            inherit: "highlighting" 0.0;
-            color: 255 255 255 255;
+
+         part {
+            name: "elm.padding.left";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel2.relative: 0 1;
+               min: LIST_PADDING_LEFT_SIZE_INC 0;
+               max: LIST_PADDING_LEFT_SIZE_INC -1;
+            }
          }
-         )
-         PART(TEXTBLOCK, "elm.text.1",
-         clip_to: "clipper.sub_text";
-         DESC_LRB("elm.padding.left", "elm.padding.right", "elm.text.2",
-         fixed: 1 0;
-         min: 0 LIST_TEXT_SUB_HEIGHT_INC;
-         PARAM_SUB_TEXT("list_text_sub_normal",)
-         )
-         description { state: "pressed" 0.0;
-            inherit: "default" 0.0;
-            text.style: "list_text_sub_press";
+
+         part {
+            name: "elm.padding.right";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1.relative: 1 0;
+               min: LIST_PADDING_RIGHT_SIZE_INC 0;
+               max: LIST_PADDING_RIGHT_SIZE_INC -1;
+            }
          }
-         description { state: "disabled" 0.0;
-            inherit: "default" 0.0;
-            text.style: "list_text_sub_disabled";
+
+         part {
+            name: "elm.padding.top";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               fixed: 0 1;
+               align: 0.5 0.0;
+               rel2.relative: 1.0 0.0;
+               min: 0 LIST_3LINE_PADDING_TOP_SIZE_INC;
+               max: -1 LIST_3LINE_PADDING_TOP_SIZE_INC;
+            }
+            description { state: "highlighting" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "highlighted" 0.0;
+               inherit: "highlighting" 0.0;
+               min: 0 LIST_3LINE_PADDING_HIGHLIGHTED_TOP_SIZE_INC;
+               max: -1 LIST_3LINE_PADDING_HIGHLIGHTED_TOP_SIZE_INC;
+            }
+         }
+
+         part {
+            name: "elm.padding.bottom";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               fixed: 0 1;
+               align: 0.5 1.0;
+               rel1.relative: 0.0 1.0;
+               min: 0 LIST_3LINE_PADDING_BOTTOM_SIZE_INC;
+               max: -1 LIST_3LINE_PADDING_BOTTOM_SIZE_INC;
+            }
+            description { state: "highlighting" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "highlighted" 0.0;
+               inherit: "highlighting" 0.0;
+               min: 0 LIST_3LINE_PADDING_HIGHLIGHTED_BOTTOM_SIZE_INC;
+               max: -1 LIST_3LINE_PADDING_HIGHLIGHTED_BOTTOM_SIZE_INC;
+            }
+         }
+
+         part {
+            name: "elm.padding.bottom.1";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               fixed: 0 1;
+               align: 0.5 1.0;
+               rel1.relative: 0.0 1.0;
+               min: 0 0;
+               max: -1 0;
+            }
+         }
+
+
+         part {
+            name: "elm.swallow.text";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  relative: 1 1;
+                  to_x: "elm.padding.left";
+                  to_y: "elm.padding.top";
+               }
+               rel2 {
+                  relative: 0 0;
+                  to_x: "elm.padding.right";
+                  to_y: "elm.padding.bottom";
+               }
+               fixed: 1 0;
+               min: 0 MAX_TEXT_HEIGHT;
+               max: 0 MAX_TEXT_HEIGHT;
+               align: 0.5 0.5;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
          }
-         )
-         PART(TEXTBLOCK, "elm.text.2",
-         clip_to: "clipper.sub_text";
-         DESC_LRB("elm.padding.left", "elm.padding.right", "elm.padding.bottom.1",
-         fixed: 1 0;
-         min: 0 LIST_TEXT_SUB_HEIGHT_INC;
-         PARAM_SUB_TEXT("list_text_sub_normal",)
-         )
-         description { state: "pressed" 0.0;
-            inherit: "default" 0.0;
-            text.style: "list_text_sub_press";
+
+         part {
+            name: "elm.padding.slide.end";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default";
+               align: 0 0.5;
+               fixed: 1 0;
+               rel1 {
+                  relative: 1 0;
+                  to_x: "padding.icon.left";
+               }
+               rel2 {
+                  relative: 1 1;
+                  to_x: "padding.icon.left";
+               }
+               min: 0 0;
+               max: 0 -1;
+            }
+         }
+
+         part {
+            name: "clipper.text";
+            type: RECT;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  relative: 0 0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0 1;
+                  to_x: "padding.icon.left";
+                  to_y: "main.spacer";
+               }
+            }
+         }
+
+         part {
+            name: "elm.text";
+            type: TEXTBLOCK;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  relative: 0 0;
+                  to: "main.spacer";
+               }
+               rel2 {
+                  relative: 1 1;
+                  to: "main.spacer";
+               }
+               fixed: 1 0;
+               min: 0 MAX_TEXT_HEIGHT;
+               align: 0.5 0.5;
+               text {
+                  min: 0 1;
+                  max: 1 1;
+                  ellipsis: -1.0;
+                  fade_ellipsis: 1.0;
+                  style: "list_text_main_normal";
+               }
+            }
+         }
+
+         part {
+            name: "elm.text.sliding";
+            type: TEXTBLOCK;
+            scale: 1;
+            clip_to: "clipper.text";
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  relative: 0 0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0 1;
+                  to_x: "padding.icon.left";
+                  to_y: "main.spacer";
+               }
+               fixed: 1 0;
+               min: 0 MAX_TEXT_HEIGHT;
+               align: 1 0.5;
+               text {
+                  min: 0 1;
+                  max: 1 1;
+                  ellipsis: -1.0;
+                  fade_ellipsis: 1.0;
+                  style: "list_text_main_normal";
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               text.style: "list_text_main_disabled";
+            }
+            description { state: "slide" 0.0;
+               inherit: "default" 0.0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 0.0 0.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0.0 1.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               text.min: 1 1;
+            }
+            description { state: "slide_1" 0.0;
+               inherit: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 {
+                  relative: 0.0 0.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0.0 1.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               text.min: 1 1;
+            }
+            description { state: "slide_2" 0.0;
+               inherit: "default" 0.0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 0.0 0.0;
+                  to_x: "padding.icon.left";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0.0 1.0;
+                  to_x: "elm.padding.slide.end";
+                  to_y: "main.spacer";
+               }
+            }
+            description { state: "slide_disabled" 0.0;
+               inherit: "disabled" 0.0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 0.0 0.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0.0 1.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               text.min: 1 1;
+            }
+            description { state: "slide_1_disabled" 0.0;
+               inherit: "disabled" 0.0;
+               align: 1.0 0.5;
+               rel1 {
+                  relative: 0.0 0.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0.0 1.0;
+                  to_x: "main.spacer";
+                  to_y: "main.spacer";
+               }
+               text.min: 1 1;
+            }
+            description { state: "slide_2_disabled" 0.0;
+               inherit: "disabled" 0.0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 0.0 0.0;
+                  to_x: "padding.icon.left";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 0.0 1.0;
+                  to_x: "elm.padding.slide.end";
+                  to_y: "main.spacer";
+               }
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+               text.style: "list_text_main_press";
+            }
          }
-         description { state: "disabled" 0.0;
-            inherit: "default" 0.0;
-            text.style: "list_text_sub_disabled";
+
+         part {
+            name: "padding.icon.left";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               min: PADDING_WIDTH MAX_TEXT_HEIGHT;
+               max: PADDING_WIDTH MAX_TEXT_HEIGHT;
+               align: 0 0;
+               rel1 {
+                  relative: 1 0;
+                  to_x: "elm.text";
+                  to_y: "main.spacer";
+               }
+            }
+         }
+
+         part {
+            name: "elm.icon";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               max: 0 0;
+               align: 0 0.5;
+               rel1 {
+                  relative: 1 0;
+                  to_x: "padding.icon.left";
+                  to_y: "main.spacer";
+               }
+               rel2 {
+                  relative: 1 1;
+                  to_y: "main.spacer";
+               }
+            }
+         }
+
+         part {
+            name: "main.spacer";
+            type: SPACER;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               fixed: 0 1;
+               min: 0 MAX_TEXT_HEIGHT;
+               max: MAX_MAIN_TEXT_WIDTH MAX_TEXT_HEIGHT;
+               align: 0.5 0.5;
+               rel1 {
+                  relative: 1 0;
+                  to_x: "elm.padding.left";
+                  to_y: "elm.icon2";
+               }
+               rel2 {
+                  relative: 0 1;
+                  to: "elm.icon2";
+               }
+            }
+         }
+
+         part {
+            name: "elm.icon2";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               max: 0 MAX_TEXT_HEIGHT;
+               align: 1 1;
+               visible: 0;
+               rel2 {
+                  relative: 0 1;
+                  to_x: "elm.padding.right";
+                  to_y: "elm.swallow.text";
+               }
+            }
+         }
+
+         part {
+            name: "clipper.sub_text";
+            type: RECT;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  relative: 1 1;
+                  to_x: "elm.padding.left";
+                  to_y: "elm.padding.top";
+               }
+               rel2 {
+                  relative: 0 0;
+                  to_x: "elm.padding.right";
+                  to_y: "elm.padding.bottom.1";
+               }
+               visible: 0;
+            }
+            description { state: "highlighting" 0.0;
+               visible: 1;
+               color: 0 0 0 0;
+            }
+            description { state: "highlighted" 0.0;
+               inherit: "highlighting" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part {
+            name: "elm.text.1";
+            type: TEXTBLOCK;
+            clip_to: "clipper.sub_text";
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               align: 0.5 0.0;
+               rel1 {
+                  relative: 1 1;
+                  to_x: "elm.padding.left";
+                  to_y: "elm.swallow.text";
+               }
+               rel2 {
+                  relative: 0 0;
+                  to_x: "elm.padding.right";
+                  to_y: "elm.text.2";
+               }
+               fixed: 1 0;
+               min: 0 64;
+               max: MAX_MAIN_TEXT_WIDTH 64;
+               text {
+                  align: 0.5 0;
+                  min: 1 1;
+                  max: 0 0;
+                  ellipsis: -1;
+                  style: "list_text_sub_normal";
+               }
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+               text.style: "list_text_sub_press";
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               text.style: "list_text_sub_disabled";
+            }
+         }
+
+         part {
+            name: "elm.text.2";
+            type: TEXTBLOCK;
+            clip_to: "clipper.sub_text";
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  relative: 1 0;
+                  to_x: "elm.padding.left";
+                  to_y: "elm.padding.bottom.1";
+               }
+               rel2 {
+                  relative: 0 0;
+                  to_x: "elm.padding.right";
+                  to_y: "elm.padding.bottom.1";
+               }
+               fixed: 1 0;
+               min: 0 LIST_TEXT_SUB_HEIGHT_INC;
+               align: 0.5 1.0;
+               text {
+                  min: 0 1;
+                  max: 1 1;
+                  style: "list_text_sub_normal";
+               }
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+               text.style: "list_text_sub_press";
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               text.style: "list_text_sub_disabled";
+            }
+         }
+
+         part {
+            name: "elm.swallow.center_check";
+            type: SWALLOW;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               align: 0.5 0.5;
+            }
+         }
+
+         part {
+            name: "event_block";
+            type: RECT;
+            mouse_events: 0;
+            repeat_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "blocked" 0.0;
+               color: 0 0 0 0;
+               visible: 1;
+            }
          }
-         )
-         PART_CENTER_CHECK
-         PART_LIST_EVENT
       }
       programs {
-         PROGRAM_LIST_DEFAULT(target: "elm.text"; target: "elm.text.1"; target: "elm.text.2"; target: "elm.padding.top"; target: "elm.padding.bottom"; target: "clipper.sub_text"; )
+         PROGRAM_LIST_DEFAULT(target: "elm.text.sliding"; target: "elm.text"; target: "elm.text"; target: "elm.text.1"; target: "elm.text.2"; target: "elm.padding.top"; target: "elm.padding.bottom"; target: "clipper.sub_text"; )
          PROGRAM_LIST_HIGHLIGHT(target: "clipper.sub_text"; target: "elm.padding.top"; target: "elm.padding.bottom"; )
-         PROGRAM_LIST_DISABLE_SLIDE(target: "elm.text"; target: "elm.text.1"; target: "elm.text.2"; )
+         PROGRAM_LIST_DISABLE_SLIDE(target: "elm.text.sliding"; target: "elm.text"; target: "elm.text.1"; target: "elm.text.2"; )
          PROGRAM_LIST_SOUND
          PROGRAM_LIST_EVENT
       }
index 9f7fcc06a171f94f91319a9509b6ea61566b6332..46ae4a0414a98820aa0c199704b37b3a52819279 100644 (file)
@@ -162,6 +162,7 @@ Eina_Bool ListItem::elm_gen_item_filter_cb(void *data, Evas_Object *obj, void *k
 Evas_Object *ListItem::addCheck()
 {
     Evas_Object *check = elm_check_add(*getOwner());
+    elm_object_style_set(check, "genlist/select_mode");
     elm_check_state_set(check, m_Checked);
     evas_object_propagate_events_set(check, EINA_FALSE);
     evas_object_smart_callback_add(check, "changed", makeCbFirst(&ListItem::onCheckChanged), this);
index 1cbb00ad954ebec2c34ddae9d3d146960f618d60..1a20ac518205527adf27e0e28b514dcc8ce7a1cf 100644 (file)
 #include "TextDecorator.h"
 #include "Resource.h"
 
-#include <Elementary.h>
 #include <stdlib.h>
 
 using namespace Msg;
 
 namespace {
-    const char *namePart = "elm.text";
+    const char *namePart = "elm.text.sliding";
+    const char *namePartMask = "elm.text";
     const char *messagePart = "elm.text.1";
     const char *timePart = "elm.text.2";
     const char *checkBoxPart = "elm.swallow.center_check";
     const char *iconPart = "elm.icon";
+    const char *iconPaddingPart = "elm.icon2";
 }
 
 ThreadListViewItem::ThreadListViewItem()
@@ -49,7 +50,7 @@ std::string ThreadListViewItem::getText(ListItem &item, const char *part)
 {
     if (!strcmp(part, messagePart)) {
         return getMessage();
-    } else if (!strcmp(part, namePart)) {
+    } else if (!strcmp(part, namePart) || !strcmp(part, namePartMask)) {
         return getName();
     } else if (!strcmp(part, timePart)) {
         return getTime();
@@ -62,10 +63,8 @@ Evas_Object *ThreadListViewItem::getContent(ListItem &item, const char *part)
 {
     Evas_Object *content = nullptr;
 
-    if (!strcmp(part, iconPart)) {
-        if (m_State == IconState)
-            content = makeUnreadIcon(getUnreadCount());
-    }
+    if (!strcmp(part, iconPart) || !strcmp(part, iconPaddingPart))
+        content = makeUnreadIcon(getUnreadCount());
 
     return content;
 }