Fixed: GUI for recip panel. 59/86359/4
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 31 Aug 2016 17:26:57 +0000 (20:26 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 1 Sep 2016 11:42:09 +0000 (14:42 +0300)
Change-Id: I614cf45679c53e0a61835be5018a34328c28662c
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
.cproject
.gitignore
inc/Resource.h
res/edje/recipient_panel.edc
src/Conversation/Body/View/src/BodyView.cpp
src/Conversation/Main/View/src/MessageInputPanel.cpp
src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h
src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp
src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h
src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp

index 8d8a04f..84dc807 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -16,7 +16,7 @@
                                </extensions>
                        </storageModule>
                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactName="message" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.405253889" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug">
+                               <configuration artifactName="message" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.405253889" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug">
                                        <folderInfo id="org.tizen.nativecore.config.sbi.gcc45.app.debug.405253889." name="/" resourcePath="">
                                                <toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug.565891943" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug">
                                                        <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1078985799" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                        <listOptionValue builtIn="false" value=""/>
                                                                </option>
                                                                <option id="gnu.c.compiler.option.misc.other.1180439494" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0" valueType="string"/>
-                                                               <option id="gnu.c.compiler.option.dialect.std.1104421294" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
+                                                               <option id="gnu.c.compiler.option.dialect.std.1104421294" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1240601561" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
                                                        </tool>
                                                        <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1212756061" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
                                                                        <listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/>
                                                                        <listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/>
                                                                        <listOptionValue builtIn="false" value="-pie -lpthread "/>
-                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=&quot;/home/developer/sdk_tools/lib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-Xlinker --version-script=&quot;${PROJ_PATH}/.exportMap&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
                                </extensions>
                        </storageModule>
                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactName="message" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.release.290645162" name="Release" parent="org.tizen.nativecore.config.sbi.gcc45.app.release">
+                               <configuration artifactName="message" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.release.290645162" name="Release" parent="org.tizen.nativecore.config.sbi.gcc45.app.release">
                                        <folderInfo id="org.tizen.nativecore.config.sbi.gcc45.app.release.290645162." name="/" resourcePath="">
                                                <toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.release.1661667238" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.release">
                                                        <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.285416147" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                        <listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/>
                                                                        <listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/>
                                                                        <listOptionValue builtIn="false" value="-pie -lpthread "/>
-                                                                       <listOptionValue builtIn="false" value="-Xlinker -rpath=&quot;/home/developer/sdk_tools/lib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-Xlinker --version-script=&quot;${PROJ_PATH}/.exportMap&quot;"/>
                                                                        <listOptionValue builtIn="false" value="-L&quot;${SBI_SYSROOT}/usr/lib&quot;"/>
        <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
        <storageModule moduleId="com.samsung.tizen.nativeapp.projectInfo" version="1.0.0"/>
        <storageModule moduleId="refreshScope" versionNumber="2">
-               <configuration configurationName="Release">
+               <configuration configurationName="Debug">
                        <resource resourceType="PROJECT" workspacePath="/message"/>
                </configuration>
-               <configuration configurationName="Debug">
+               <configuration configurationName="Release">
                        <resource resourceType="PROJECT" workspacePath="/message"/>
                </configuration>
        </storageModule>
index 88102f5..65a06db 100644 (file)
@@ -11,3 +11,4 @@ crash-info
 org.tizen.message-Test-result.xml
 .package-stamp
 .svace-dir
+*.edj
index 0b35730..3d19a85 100644 (file)
@@ -62,9 +62,4 @@
 #define THUMB_GROUP_IMG_PATH             IMAGE_PATH"/messages_list_thumb_image_multi.png"
 #define MSG_THREAD_FLOATING_BTN_ICON     IMAGE_PATH"/message_floating_button_icon.png"
 
-// Colors:
-#define BUTTON_COLOR                     78, 97, 173, 255
-#define BUTTON_PRESSED_COLOR             60, 75, 140, 255
-#define BUTTON_DISABLED_COLOR            179, 197, 218, 255
-
 #endif /* RESOURCE_H_ */
index 5d3d8c5..0cf6809 100755 (executable)
@@ -1,15 +1,13 @@
 #include "macros.inl"
 #include "colors_define.inl"
 
-#define MSG_COMPOSER_RECIPIENT_TO_FIELD_MIN_H 87
-#define CONTACT_BUTTON_PADDING_TOP 10
-#define CONTACT_BUTTON_PADDING_BOTTOM 10
-#define CONTACT_BUTTON_SIZE 50 50
-#define FAILED_BUTTON_SIZE 50*1.8/2.6 50*1.8/2.6 //TODO: remove 1.8/2.6 when base scale in this file will be fixed
+#define MSG_COMPOSER_RECIPIENT_TO_FIELD_MIN_H 80
+#define BUTTON_SIZE 50 50
+#define BUTTON_RECT_SIZE 80 80
 #define RECIP_FAILED_COLOR 246 183 183 255
 
 collections {
-    base_scale: 1.8; // TODO: fix base scale
+    BASE_SCALE;
 
 group {
     name: "recipient_panel";
@@ -19,14 +17,12 @@ group {
     }
     parts {
         part {
-            name: "bg"; 
-            type: SWALLOW;
+            name: "space";
+            type: SPACER;
             scale: 1;
-            mouse_events: 0;
             description {
                 state: "default" 0.0;
                 min: 0 MSG_COMPOSER_RECIPIENT_TO_FIELD_MIN_H;
-                fixed: 0 1;
                 rel1.to: "swl.mbe";
                 rel2.to: "entry.main.bg";
             }
@@ -92,7 +88,7 @@ group {
             mouse_events:  0;
             description {
                 state: "default" 0.0;
-                min: 8 0;
+                min: 30 0;
                 fixed: 1 0;
                 rel1{relative: 0.0 0.0; to: "entry.main.bg";}
                 rel2{relative: 0.0 1.0; to: "entry.main.bg";}
@@ -106,7 +102,7 @@ group {
             mouse_events:  0;
             description {
                 state: "default" 0.0;
-                min: 16 0;
+                min: 17 0;
                 fixed: 1 0;
                 rel1{relative: 1.0 0.0; to: "entry.main.bg";}
                 rel2{relative: 1.0 1.0; to: "entry.main.bg";}
@@ -170,6 +166,28 @@ group {
             }
         }
         part {
+            name: "bottom_line";
+            type: RECT;
+            scale: 1;
+            repeat_events: 1;
+            description {
+                state: "default" 0.0;
+                rel1 { to: "swl.entry"; relative: 0.0 0.0; }
+                rel2 { to: "swl.entry"; relative: 1.0 1.0; }
+                min: 0 3;
+                max: -1 3;
+                fixed: 1 1;
+                align: 0.0 1.0;
+                color: 0 0 0 51;
+                visible: 0;
+            }
+            description {
+                state: "show" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part {
             name: "img.invalid_icon_bg";
             type: IMAGE;
             scale: 1;
@@ -188,8 +206,8 @@ group {
             description {
                 state: "show" 0.0;
                 inherit: "default" 0.0;
-                min: FAILED_BUTTON_SIZE;
-                max: FAILED_BUTTON_SIZE;
+                min: BUTTON_SIZE;
+                max: BUTTON_SIZE;
                 visible: 1;
             }
         }
@@ -211,8 +229,8 @@ group {
             description {
                 state: "show" 0.0;
                 inherit: "default" 0.0;
-                min: FAILED_BUTTON_SIZE;
-                max: FAILED_BUTTON_SIZE;
+                min: BUTTON_SIZE;
+                max: BUTTON_SIZE;
                 visible: 1;
             }
         }
@@ -242,8 +260,9 @@ group {
             description {
                 state: "show" 0.0;
                 inherit: "default" 0.0;
-                min: 1 1;
+                min: 50 50;
                 fixed: 1 1;
+                align: 0.5 0.5;
                 visible: 1;
                 rel1 { to: "rect.btn"; relative: 0.0 0.0; }
                 rel2 { to: "rect.btn"; relative: 1.0 1.0; }
@@ -257,8 +276,8 @@ group {
             mouse_events: 0;
             description {
                 state: "default" 0.0;   //hide prev button
-                min: CONTACT_BUTTON_SIZE;
-                max: CONTACT_BUTTON_SIZE;
+                min: BUTTON_RECT_SIZE;
+                max: BUTTON_RECT_SIZE;
                 fixed: 1 1;
                 rel1 { to_x: "entry_padding_right"; to_y: "entry_padding_top"; relative: 0.0 1.0; }
                 rel2 { to_x: "entry_padding_right"; to_y: "entry_padding_bottom"; relative: 0.0 0.0; }
@@ -319,6 +338,7 @@ group {
             target: "swl.entry";
             target: "entry.main.bg";
             target: "swl.contact_btn";
+            target: "bottom_line";
         }
         program {
             name: "hide_entry";
@@ -328,6 +348,7 @@ group {
             target: "swl.entry";
             target: "entry.main.bg";
             target: "swl.contact_btn";
+            target: "bottom_line";
         }
         program {
             name: "show_invalid_icon";
index a636892..f14fbdd 100644 (file)
@@ -27,7 +27,7 @@ using namespace Msg;
 
 namespace
 {
-    #define maxBodyHeight ELM_SCALE_SIZE(450)
+    #define maxBodyHeight ELM_SCALE_SIZE(360)
 
     inline bool isBackKey(const char *name)
     {
index acf9793..19997fa 100644 (file)
 
 using namespace Msg;
 
+#define BUTTON_COLOR                     78, 97, 173, 255
+#define BUTTON_PRESSED_COLOR             60, 75, 140, 255
+#define BUTTON_DISABLED_COLOR            179, 197, 218, 255
+
 namespace
 {
     const char *buttonIdKey = "id";
index 7c93384..b493c2a 100644 (file)
@@ -48,8 +48,6 @@ namespace Msg
             void update(const MsgAddressList &addressList);
             void execCmd(const AppControlComposeRef &cmd);
             MbeRecipients::AppendItemStatus appendItem(const std::string &address, MsgAddress::AddressType addressType = MsgAddress::UnknownAddressType);
-            void removeSelectedItem();
-            void editSelectedItem();
             bool addRecipientsFromEntry(bool showPopup = true);
             MbeRecipients &getMbeRecipients();
 
index d16f198..26460c1 100644 (file)
@@ -35,6 +35,7 @@ ConvRecipientsPanel::ConvRecipientsPanel(Evas_Object *parent, App &app)
     m_pMbe->setListener(this);
     m_pMbe->show();
     setMbe(m_pMbe);
+    showButton(ContactButton);
     m_App.getContactManager().addListener(*this);
 }
 
@@ -150,26 +151,6 @@ MbeRecipients::AppendItemStatus ConvRecipientsPanel::appendItem(const std::strin
     return appendStatus;
 }
 
-void ConvRecipientsPanel::removeSelectedItem()
-{
-    MbeRecipientItem* pItem = getSelectedItem();
-    if(pItem)
-        pItem->destroy();
-}
-
-void ConvRecipientsPanel::editSelectedItem()
-{
-    MbeRecipientItem* pItem = getSelectedItem();
-    if(pItem)
-    {
-        setEditMode(true);
-        setEntryText(pItem->getAddress());
-        showEntry(true);
-        pItem->destroy();
-        setEntryFocus(true);
-    }
-}
-
 void ConvRecipientsPanel::execCmd(const AppControlComposeRef &cmd)
 {
     m_pMbe->clear();
index cc3dcc6..c610320 100644 (file)
@@ -33,6 +33,8 @@ namespace Msg
             ConvRecipientsPanelView(Evas_Object *parent, int entryMaxCharCount);
             virtual ~ConvRecipientsPanelView();
 
+            void editSelectedItem();
+            void removeSelectedItem();
             Evas_Object *getAreaRect() const;
             void showMbe(bool show, bool animation = true);
             void showEntry(bool show);
index f70c399..92fee21 100644 (file)
@@ -25,6 +25,9 @@
 
 using namespace Msg;
 
+#define BUTTON_COLOR                     61, 185, 204, 255
+#define BUTTON_PRESSED_COLOR             50, 160, 170, 255
+
 namespace
 {
     const char *buttonPart = "swl.contact_btn";
@@ -396,6 +399,32 @@ void ConvRecipientsPanelView::updateShortenedRecipients()
     }
 }
 
+void ConvRecipientsPanelView::editSelectedItem()
+{
+    MbeRecipientItem* pItem = getSelectedItem();
+    if(pItem)
+    {
+        setEditMode(true);
+        setEntryText(pItem->getAddress());
+        showEntry(true);
+        pItem->destroy();
+        if(isMbeEmpty())
+            showMbe(false, false);
+        setEntryFocus(true);
+    }
+}
+
+void ConvRecipientsPanelView::removeSelectedItem()
+{
+    MbeRecipientItem* pItem = getSelectedItem();
+    if(pItem)
+    {
+        pItem->destroy();
+        if(isMbeEmpty())
+            showMbe(false, false);
+    }
+}
+
 void ConvRecipientsPanelView::setEditMode(bool isEdit)
 {
     m_IsEditItemClicked = isEdit;