TizenRefApp-8083 Disabled mode does not work in ThreadComposeListViewItem 59/117559/2
authorOleksander Kostenko <o.kostenko@samsung.com>
Mon, 6 Mar 2017 11:41:53 +0000 (13:41 +0200)
committerOleksander Kostenko <o.kostenko@samsung.com>
Mon, 6 Mar 2017 13:24:45 +0000 (15:24 +0200)
Change-Id: If875c3647454e3c5a556d5db508168fc7fabda72
Signed-off-by: Oleksander Kostenko <o.kostenko@samsung.com>
edje/images/messages_attach_ic_calendar.png [deleted file]
edje/images/messages_attach_ic_contact.png [deleted file]
edje/images/messages_icon_bg.png [deleted file]
edje/images/msg_list_icon_bg.png [new file with mode: 0644]
edje/images/msg_list_icon_composer.png [new file with mode: 0644]
edje/images/msg_list_icon_recipients_bg.png [new file with mode: 0644]
res/edje/icons.edc
res/edje/thread_compose_list_view_item.edc

diff --git a/edje/images/messages_attach_ic_calendar.png b/edje/images/messages_attach_ic_calendar.png
deleted file mode 100644 (file)
index 494bfa3..0000000
Binary files a/edje/images/messages_attach_ic_calendar.png and /dev/null differ
diff --git a/edje/images/messages_attach_ic_contact.png b/edje/images/messages_attach_ic_contact.png
deleted file mode 100644 (file)
index 6fbc91d..0000000
Binary files a/edje/images/messages_attach_ic_contact.png and /dev/null differ
diff --git a/edje/images/messages_icon_bg.png b/edje/images/messages_icon_bg.png
deleted file mode 100644 (file)
index 89fa34c..0000000
Binary files a/edje/images/messages_icon_bg.png and /dev/null differ
diff --git a/edje/images/msg_list_icon_bg.png b/edje/images/msg_list_icon_bg.png
new file mode 100644 (file)
index 0000000..1cefa62
Binary files /dev/null and b/edje/images/msg_list_icon_bg.png differ
diff --git a/edje/images/msg_list_icon_composer.png b/edje/images/msg_list_icon_composer.png
new file mode 100644 (file)
index 0000000..5645d44
Binary files /dev/null and b/edje/images/msg_list_icon_composer.png differ
diff --git a/edje/images/msg_list_icon_recipients_bg.png b/edje/images/msg_list_icon_recipients_bg.png
new file mode 100644 (file)
index 0000000..36628aa
Binary files /dev/null and b/edje/images/msg_list_icon_recipients_bg.png differ
index 265da798a2bf96d30aa41785bf6ce3ec42ac2046..0700045dc95b48a5ba9d34dc6e142965387bcc7d 100755 (executable)
@@ -20,6 +20,10 @@ collections {
                state: "pressed" 0.0;
                inherit: "default";
             }
+            description {
+               state: "disabled" 0.0;
+               inherit: "default";
+            }
          }
       }
       programs {
@@ -37,13 +41,25 @@ collections {
             target: "bg";
             transition: LINEAR  0.1;
          }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "bg";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "bg";
+         }
       }
    }
    group {
       name: "compose_icon";
       images {
-         image: "messages_attach_ic_calendar.png" RAW; //change when icon will be added
-         image: "messages_icon_bg.png" RAW;
+         image: "msg_list_icon_composer.png" RAW; //change when icon will be added
+         image: "msg_list_icon_bg.png" RAW;
       }
       inherit: "base_icon";
       parts {
@@ -51,13 +67,18 @@ collections {
             name: "bg";
             description {
                state: "default" 0.0;
-               image.normal: "messages_icon_bg.png";
-               color: 255 166 0 255;
+               image.normal: "msg_list_icon_bg.png";
+               color: 255 150 13 255;
             }
             description {
                state: "pressed" 0.0;
                inherit: "default";
-               color: 184 119 0 255;
+               color: 255 150 13 102;
+            }
+            description {
+               state: "disabled" 0.0;
+               inherit: "default";
+               color: 255 150 13 102;
             }
          }
          part {
@@ -65,7 +86,7 @@ collections {
             type: IMAGE;
             description {
                state: "default" 0.0;
-               image.normal: "messages_attach_ic_calendar.png";
+               image.normal: "msg_list_icon_composer.png";
                color: 250 250 250 255;
             }
          }
@@ -74,8 +95,8 @@ collections {
    group {
       name: "contacts_icon";
       images {
-         image: "messages_attach_ic_contact.png" RAW; //change when icon will be added
-         image: "messages_icon_bg.png" RAW;
+         image: "msg_list_icon_recipients_bg.png" RAW; //change when icon will be added
+         image: "msg_list_icon_bg.png" RAW;
       }
       inherit: "base_icon";
       parts {
@@ -83,13 +104,18 @@ collections {
             name: "bg";
             description {
                state: "default" 0.0;
-               image.normal: "messages_icon_bg.png";
-               color: 255 166 0 255;
+               image.normal: "msg_list_icon_bg.png";
+               color: 252 122 0 255;
             }
             description {
                state: "pressed" 0.0;
                inherit: "default";
-               color: 184 119 0 255;
+               color: 252 122 0 102;
+            }
+            description {
+               state: "disabled" 0.0;
+               inherit: "default";
+               color: 252 122 0 102;
             }
          }
          part {
@@ -97,7 +123,7 @@ collections {
             type: IMAGE;
             description {
                state: "default" 0.0;
-               image.normal: "messages_attach_ic_contact.png";
+               image.normal: "msg_list_icon_recipients_bg.png";
                color: 250 250 250 255;
             }
          }
index 5966922bd35c8b5919f2d29e6fec028c8958832a..feba24e1de292346735ab64dea8d93da27c9d84e 100644 (file)
@@ -1,16 +1,4 @@
 #include "macros.inl"
-
-#define LIST_PADDING_ICON_LEFT_SIZE_INC                    60
-#define LIST_PADDING_ICON_RIGHT_SIZE_INC                   60
-
-#define LIST_PADDING_TOP_SIZE_INC                          10
-#define LIST_PADDING_BOTTOM_SIZE_INC                       10
-
-#define LIST_FOCUS_BG_PADDING_TOP_SIZE_INC                 11
-#define LIST_FOCUS_BG_PADDING_BOTTOM_SIZE_INC              11
-
-#define ICON_SIZE                                          100
-
 // ------------------
 // | --> HERE
 // ------------------
       DESCRIPION \
    }
 
-#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) \
+#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 PROGRAM_LIST_EVENT \
+   program { name: "content_event_disable"; \
+      signal: "elm,state,disabled"; \
+      source: "elm"; \
+      script { \
+         set_mouse_events(PART:"event_block", 1); \
+         set_repeat_events(PART:"event_block", 0); \
+         set_state(PART:"event_block", "blocked", 0.0); \
+      } \
+   } \
+   program { name: "content_event_enable"; \
+      signal: "elm,state,enabled"; \
+      source: "elm"; \
+      script { \
+         set_mouse_events(PART:"event_block", 0); \
+         set_repeat_events(PART:"event_block", 1); \
+         set_state(PART:"event_block", "default", 0.0); \
+      } \
+   }
+
+#define PART_LIST_PADDINGS(LEFT_SIZE, RIGHT_SIZE, TOP_SIZE, BOTTOM_SIZE) \
    PART(SPACER, "elm.padding.left", \
       DESC_FROM_L( \
          min: LEFT_SIZE 0; \
          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 LIST_PADDING_ICON_LEFT_SIZE_INC                    66
+#define LIST_PADDING_ICON_RIGHT_SIZE_INC                   66
+
+#define LIST_PADDING_TOP_SIZE_INC                          10
+#define LIST_PADDING_BOTTOM_SIZE_INC                       9
+
+#define ICON_SIZE                                          112
+
 collections {
    BASE_SCALE;
    group { name: "elm/genlist/item/2icon/default";
@@ -180,26 +174,34 @@ collections {
       data.item: "focus_bg" "off";
 
       parts {
-         PART_LIST_PADDINGS_FOCUS_BG(
-         LIST_PADDING_ICON_LEFT_SIZE_INC, LIST_PADDING_ICON_RIGHT_SIZE_INC,
-         LIST_PADDING_TOP_SIZE_INC, LIST_PADDING_BOTTOM_SIZE_INC, 0, 0, 0,
-         LIST_FOCUS_BG_PADDING_TOP_SIZE_INC, LIST_FOCUS_BG_PADDING_BOTTOM_SIZE_INC
-         )
-         PART(SWALLOW, "elm.right",
-         DESC_RTB("elm.padding.right", "elm.padding.top", "elm.padding.bottom",)
-         )
-         PART(SWALLOW, "elm.left",
-         DESC_LTB("elm.padding.left", "elm.padding.top", "elm.padding.bottom",)
-         )
+         part {
+            name: "bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+
+         PART_LIST_PADDINGS(LIST_PADDING_ICON_LEFT_SIZE_INC, LIST_PADDING_ICON_RIGHT_SIZE_INC, LIST_PADDING_TOP_SIZE_INC, LIST_PADDING_BOTTOM_SIZE_INC)
+
+         PART(SWALLOW, "elm.right", DESC_RTB("elm.padding.right", "elm.padding.top", "elm.padding.bottom",))
+         PART(SWALLOW, "elm.left", DESC_LTB("elm.padding.left", "elm.padding.top", "elm.padding.bottom",))
+
+         PART_LIST_EVENT
+      }
+      programs {
+         PROGRAM_LIST_EVENT
       }
    }
 
    group { name: "elm/genlist/item/compose_threadlist_item/default";
       inherit: "elm/genlist/item/2icon/default";
       parts {
-         part { name: "elm.left";
+         part {
+            name: "elm.left";
             scale: 1;
-            description { 
+            description {
                state: "default" 0.0;
                min: ICON_SIZE ICON_SIZE;
                max: ICON_SIZE ICON_SIZE;
@@ -210,7 +212,8 @@ collections {
                }
             }
          }
-         part { name: "elm.right";
+         part {
+            name: "elm.right";
             scale: 1;
             description {
                state: "default" 0.0;