Added 1icon_1text_attachment style 95/80095/1 submit/tizen_dev/20160719.083834
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 14 Jul 2016 12:34:49 +0000 (15:34 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 14 Jul 2016 12:34:49 +0000 (15:34 +0300)
Change-Id: I3b69007c8ccf5edb6d446b9bd7e47e739a83bdc2
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
res/edje/conv_list_attachments.edc
src/Conversation/ConvList/View/src/BubbleIconTextLayoutItem.cpp

index 6804133..2ac26ab 100644 (file)
@@ -28,10 +28,8 @@ collections {
         }
     }
     group {
-        name: "conv/list/icon_text_attachment";
+        name: "conv/list/1icon_1text_attachment";
         parts {
-            PADDING_TOP("padding.top", 10);
-            PADDING_BOTTOM("padding.bottom", 16);
             part {
                 name: "padding.left";
                 type: SPACER;
@@ -51,9 +49,8 @@ collections {
                 scale: 1;
                 description {
                     state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    rel1 { to_x : "padding.left"; to_y: "padding.top"; relative: 1.0 1.0; }
+                    align: 0.0 0.5;
+                    rel1 { to_x : "padding.left"; relative: 1.0 0.0; }
                     max: MAX_TEXT_LEN 48;
                     text{
                         style: "main_text_style";
@@ -63,6 +60,37 @@ collections {
                 }
             }
             part {
+                name: "icon";
+                type: SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    min: 50 50;
+                    max: 50 50;
+                    align: 0.0 0.5;
+                    rel1 { relative: 0.0 0.0; }
+                    rel2 { relative: 1.0 1.0; }
+                }
+            }
+        }
+    }
+    group {
+        name: "conv/list/1icon_2text_attachment";
+        inherit: "conv/list/1icon_1text_attachment";
+        parts {
+            PADDING_TOP("padding.top", 10);
+            PADDING_BOTTOM("padding.bottom", 16);
+            part {
+                name: "main.text";
+                type: TEXTBLOCK;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    align: 0.0 0.0;
+                    rel1 { to_x : "padding.left"; to_y: "padding.top"; relative: 1.0 1.0; }
+                }
+            }
+            part {
                 name: "sub.text";
                 type: TEXTBLOCK;
                 scale: 1;
@@ -79,20 +107,6 @@ collections {
                     }
                 }
             }
-            part {
-                name: "icon";
-                type: SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    min: 50 50;
-                    max: 50 50;
-                    align: 0.0 0.5;
-                    visible: 1;
-                    rel1 { relative: 0.0 0.0; }
-                    rel2 { relative: 1.0 1.0; }
-                }
-            }
         }
     }
 }
index 44b2a7a..188e3c7 100644 (file)
@@ -27,9 +27,21 @@ using namespace Msg;
 BubbleIconTextLayoutItem::BubbleIconTextLayoutItem(BubbleEntity &entity, Evas_Object *parent, LayoutType layoutType)
     : BubbleViewItem(entity)
 {
-    // TODO: impl Layout1Icon1Text
-    Evas_Object *layout = addLayout(parent, CONV_LIST_ATTACHMENTS_EDJ_PATH, "conv/list/icon_text_attachment");
+    const char *group = nullptr;
+    switch(layoutType)
+    {
+        case Layout1Icon1Text:
+            group = "conv/list/1icon_1text_attachment";
+            break;
+
+        case Layout1Icon2Text:
+            group = "conv/list/1icon_2text_attachment";
+            break;
+    }
+
+    Evas_Object *layout = addLayout(parent, CONV_LIST_ATTACHMENTS_EDJ_PATH, group);
     setEo(layout);
+
 }
 
 BubbleIconTextLayoutItem::~BubbleIconTextLayoutItem()