Updated layout naming style in Dialer. Fixed ABS build. 82/88082/3
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Tue, 13 Sep 2016 08:27:25 +0000 (11:27 +0300)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 14 Sep 2016 10:20:10 +0000 (03:20 -0700)
Change-Id: I903d3d5e8de85b2aac17bb7a4263c32331e9a1cf
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
lib-phone/project_def.prop
lib-phone/res/dialer/edje/DialerLayout.h
lib-phone/res/dialer/edje/DialerPredictiveLayout.h
lib-phone/res/dialer/edje/dialer-button-layout.edc
lib-phone/res/dialer/edje/dialer-layout.edc
lib-phone/res/dialer/edje/dialer-predictive-layout.edc
lib-phone/src/Phone/Dialer/DialerView.cpp
lib-phone/src/Phone/Dialer/KeypadButton.cpp
lib-phone/src/Phone/Dialer/SearchResultsControl.cpp

index 1b9230d..03956f5 100644 (file)
@@ -60,7 +60,7 @@ USER_EDCS_FONT_DIRS_ABS =
 # EDC Flags
 USER_EXT_EDC_KEYS = EDC0
 
-USER_EXT_EDC0_EDCS = res/dialer/edje/dialer-keypad.edc res/dialer/edje/dialer-predictive.edc res/dialer/edje/dialer-layout.edc res/speeddial/edje/speeddial-layout.edc
+USER_EXT_EDC0_EDCS = res/dialer/edje/dialer-layout.edc res/dialer/edje/dialer-button-layout.edc res/dialer/edje/dialer-predictive-layout.edc res/speeddial/edje/speeddial-layout.edc
 USER_EXT_EDC0_EDCS_IMAGE_DIRS = res
 USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS =
 USER_EXT_EDC0_EDCS_SOUND_DIRS = edje/sounds
index f582ec5..90ed5d2 100644 (file)
 
 #include "DialerPath.h"
 
-#define GROUP_DIALER    "dialer"
-#define GROUP_BUTTON    "button"
+#define LAYOUT_DIALER       "dialer"
+#define LAYOUT_BUTTON       "button"
 
-#define GROUP_CALL_BTN  "call_btn"
-#define GROUP_BACK_BTN  "back_btn"
+#define LAYOUT_BUTTON_CALL  "button_call"
+#define LAYOUT_BUTTON_BACK  "button_back"
 
-#define PART_NUMBER     "swallow.number"
-#define PART_LETTERS    "swallow.letters"
+#define PART_NUMBER         "swallow.number"
+#define PART_LETTERS        "swallow.letters"
 
-#define PART_ENTRY      "swallow.entry"
-#define PART_PREDICTIVE "swallow.predictive"
-#define PART_KEYPAD     "swallow.keypad"
+#define PART_ENTRY          "swallow.entry"
+#define PART_PREDICTIVE     "swallow.predictive"
+#define PART_KEYPAD         "swallow.keypad"
 
-#define PART_CALL_BTN   "swallow.call_btn"
-#define PART_BACK_BTN   "swallow.back_btn"
+#define PART_BUTTON_CALL    "swallow.call_btn"
+#define PART_BUTTON_BACK    "swallow.back_btn"
 
-#define DIVIDER_WH 2
+#define DIVIDER_WH   2
 #define CALL_ICON_WH 70
 
-#define COLOR_KEYPAD_BTN_NUMBER 0, 0, 0, 217
-#define COLOR_KEYPAD_BTN_LETTERS 51, 51, 51, 205
-#define COLOR_CALL_BTN 89, 176, 58, 255
+#define COLOR_BUTTON_NUMBER  0, 0, 0, 217
+#define COLOR_BUTTON_LETTERS 51, 51, 51, 205
+#define COLOR_BUTTON_CALL    89, 176, 58, 255
 
 #endif /* DIALER_LAYOUT_H */
index b94726b..8b00455 100644 (file)
 
 #include "DialerPath.h"
 
-#define GROUP_PREDICTIVE        "predictive"
-#define GROUP_NO_RESULTS        "no_results"
-#define GROUP_RESULTS           "results"
-#define GROUP_MORE_BTN          "more_btn"
-#define GROUP_SPEED_DIAL        "speed_dial"
+#define LAYOUT_PREDICTIVE       "predictive"
+#define LAYOUT_NO_RESULTS       "no_results"
+#define LAYOUT_RESULTS          "results"
+#define LAYOUT_BUTTON_MORE      "button_more"
+#define LAYOUT_SPEED_DIAL       "speed_dial"
 
 #define PART_CONTENT            "swallow.content"
 #define PART_BG                 "rect.bg"
@@ -35,8 +35,8 @@
 #define PART_ADD_TEXT           "text.add"
 
 #define PART_THUMBNAIL          "swallow.thumbnail"
+#define PART_BUTTON_MORE        "swallow.button_more"
 #define PART_SPEED_DIAL         "swallow.speed_dial"
-#define PART_MORE_BTN           "swallow.more_btn"
 
 #define SIGNAL_PREDICTIVE_SHOW  "state,predictive,show"
 #define SIGNAL_PREDICTIVE_HIDE  "state,predictive,hide"
index 5411c33..e66b4eb 100644 (file)
@@ -38,7 +38,7 @@ color_classes {
 collections {
        base_scale: 2.6;
 
-       group { GROUP_BUTTON;
+       group { LAYOUT_BUTTON;
                parts {
                        rect { "rect.bg";
                                desc { "default";
index 60db858..b1d88ae 100644 (file)
@@ -23,9 +23,9 @@
 #define KEYPAD_REL_H    0.54
 #define ACTIONS_H       152
 
-#define CALL_BTN_WH     104
-#define BACK_BTN_R      82
-#define BACK_BTN_WH     90
+#define BUTTON_CALL_WH  104
+#define BUTTON_BACK_R   82
+#define BUTTON_BACK_WH  90
 
 color_classes {
        color_class { //AO008
@@ -37,15 +37,15 @@ color_classes {
                color: 250 250 250 255;
        }
        color_class { //AO014
-               name: "call_btn";
+               name: "button_call";
                color: 250 250 250 255;
        }
        color_class {
-               name: "back_btn";
+               name: "button_back";
                color: 170 170 170 255;
        }
        color_class {
-               name: "back_btn_pressed";
+               name: "button_back_pressed";
                color: 120 120 120 255;
        }
 }
@@ -53,10 +53,10 @@ color_classes {
 collections {
        base_scale: 2.6;
 
-       IMAGE_WITH_COLOR(GROUP_CALL_BTN, BUTTON_CALL, "call_btn");
-       IMAGE_WITH_COLOR_AND_TOUCH(GROUP_BACK_BTN, BUTTON_BACK, "back_btn", "back_btn_pressed");
+       IMAGE_WITH_COLOR(LAYOUT_BUTTON_CALL, BUTTON_CALL, "button_call");
+       IMAGE_WITH_COLOR_AND_TOUCH(LAYOUT_BUTTON_BACK, BUTTON_BACK, "button_back", "button_back_pressed");
 
-       group { GROUP_DIALER;
+       group { LAYOUT_DIALER;
                parts {
                        spacer { "spacer.flexible";
                                desc { "default";
@@ -128,25 +128,25 @@ collections {
                                        color_class: "actions_bg";
                                }
                        }
-                       swallow { PART_CALL_BTN; scale;
+                       swallow { PART_BUTTON_CALL; scale;
                                desc { "default";
-                                       min: CALL_BTN_WH CALL_BTN_WH;
+                                       min: BUTTON_CALL_WH BUTTON_CALL_WH;
                                        rel1 { relative: 0.5 0.5; to_y: "rect.actions"; }
                                        rel2 { relative: 0.5 0.5; to_y: "rect.actions"; }
                                }
                        }
-                       swallow { PART_BACK_BTN; scale;
+                       swallow { PART_BUTTON_BACK; scale;
                                desc { "default";
                                        align: 1.0 0.5;
-                                       min: BACK_BTN_WH BACK_BTN_WH;
-                                       rel1 { relative: 0.0 0.5; to_x: "spacer.back_btn.right"; to_y: "rect.actions"; }
-                                       rel2 { relative: 0.0 0.5; to_x: "spacer.back_btn.right"; to_y: "rect.actions"; }
+                                       min: BUTTON_BACK_WH BUTTON_BACK_WH;
+                                       rel1 { relative: 0.0 0.5; to_x: "spacer.button_back.right"; to_y: "rect.actions"; }
+                                       rel2 { relative: 0.0 0.5; to_x: "spacer.button_back.right"; to_y: "rect.actions"; }
                                }
                        }
-                       spacer { "spacer.back_btn.right"; scale;
+                       spacer { "spacer.button_back.right"; scale;
                                desc { "default";
                                        align: 1.0 0.5;
-                                       min: BACK_BTN_R 0;
+                                       min: BUTTON_BACK_R 0;
                                        rel1 { relative: 1.0 0.0; to_y: "rect.actions"; }
                                        rel2 { relative: 1.0 1.0; to_y: "rect.actions"; }
                                }
index 8f10575..1631638 100644 (file)
@@ -31,8 +31,8 @@
 #define NUMBER_H            45
 #define NUMBER_TEXT_SIZE    32
 
-#define MORE_BTN_WH         48
-#define MORE_BTN_LR         32
+#define BUTTON_MORE_WH      48
+#define BUTTON_MORE_LR      32
 #define MORE_TEXT_SIZE      36
 
 #define SPEED_DIAL_R        12
@@ -90,7 +90,7 @@ color_classes {
 collections {
        base_scale: 2.6;
 
-       group { GROUP_PREDICTIVE;
+       group { LAYOUT_PREDICTIVE;
                parts {
                        rect { PART_BG; scale;
                                desc { "default";
@@ -163,7 +163,7 @@ collections {
                }
        }
 
-       group { GROUP_NO_RESULTS;
+       group { LAYOUT_NO_RESULTS;
                parts {
                        spacer { "spacer.left"; scale;
                                desc { "default";
@@ -205,7 +205,7 @@ collections {
                }
        }
 
-       group { GROUP_RESULTS;
+       group { LAYOUT_RESULTS;
                parts {
                        spacer { "spacer.thumbnail.left"; scale;
                                desc { "default";
@@ -243,7 +243,7 @@ collections {
                                        align: 0.0 0.0;
                                        min: 0 NAME_H;
                                        rel1 { relative: 1.0 0.0; to_x: PART_SPEED_DIAL; to_y: "spacer.text.left"; }
-                                       rel2 { relative: 0.0 0.0; to_x: PART_MORE_BTN;   to_y: PART_NUMBER; }
+                                       rel2 { relative: 0.0 0.0; to_x: PART_BUTTON_MORE;   to_y: PART_NUMBER; }
                                        text {
                                                align: 0.0 0.5;
                                                style: "name_style";
@@ -254,7 +254,7 @@ collections {
                                desc { "default";
                                        align: 0.0 1.0;
                                        rel1 { relative: 1.0 1.0; to: "spacer.text.left"; }
-                                       rel2 { relative: 0.0 1.0; to_x: PART_MORE_BTN; to_y: "spacer.text.left"; }
+                                       rel2 { relative: 0.0 1.0; to_x: PART_BUTTON_MORE; to_y: "spacer.text.left"; }
                                        text {
                                                align: 0.0 0.5;
                                                style: "number_style";
@@ -265,7 +265,7 @@ collections {
                                        min: 0 NUMBER_H;
                                }
                        }
-                       swallow { PART_MORE_BTN;
+                       swallow { PART_BUTTON_MORE;
                                desc { "default";
                                        align: 1.0 0.5;
                                        rel1.relative: 1.0 0.0;
@@ -291,7 +291,7 @@ collections {
                }
        }
 
-       group { GROUP_MORE_BTN;
+       group { LAYOUT_BUTTON_MORE;
                parts {
                        rect { PART_BG;
                                desc { "default";
@@ -304,7 +304,7 @@ collections {
                        spacer { "spacer.left"; scale;
                                desc { "default";
                                        align: 0.0 0.5;
-                                       min: MORE_BTN_LR 0;
+                                       min: BUTTON_MORE_LR 0;
                                        rel1.relative: 0.0 0.0;
                                        rel2.relative: 0.0 1.0;
                                }
@@ -312,28 +312,19 @@ collections {
                        spacer { "spacer.right"; scale;
                                desc { "default";
                                        align: 1.0 0.5;
-                                       min: MORE_BTN_LR 0;
+                                       min: BUTTON_MORE_LR 0;
                                        rel1.relative: 1.0 0.0;
                                        rel2.relative: 1.0 1.0;
                                }
                        }
-                       spacer { "spacer.middle"; scale;
-                               desc { "default";
-                                       align: 0.0 0.5;
-                                       min: MORE_BTN_WH (2*MORE_BTN_WH);
-                                       rel1 { relative: 1.0 0.5; to_x: "spacer.left"; }
-                                       rel2 { relative: 0.0 0.5; to_x: "spacer.right"; }
-                               }
-                       }
                        textblock { PART_COUNT; scale; repeat;
                                desc { "default";
-                                       align: 0.5 0.0;
-                                       min: 0 MORE_BTN_WH;
-                                       rel1 { relative: 0.5 0.0; to: "spacer.middle"; }
-                                       rel2 { relative: 0.5 0.0; to: "spacer.middle"; }
+                                       align: 0.5 1.0;
+                                       min: 0 BUTTON_MORE_WH;
+                                       rel1.relative: 0.5 0.5;
+                                       rel2.relative: 0.5 0.5;
                                        text {
                                                min: 1 0;
-                                               align: 0.0 0.5;
                                                ellipsis: -1;
                                                style: "count_style";
                                        }
@@ -342,10 +333,10 @@ collections {
                        image { "image.arrow"; scale; repeat;
                                images.image: PREDICTIVE_ARROW COMP;
                                desc { "default";
-                                       align: 1.0 1.0;
-                                       min: MORE_BTN_WH MORE_BTN_WH;
-                                       rel1 { relative: 1.0 1.0; to: "spacer.middle"; }
-                                       rel2 { relative: 1.0 1.0; to: "spacer.middle"; }
+                                       align: 0.5 0.0;
+                                       min: BUTTON_MORE_WH BUTTON_MORE_WH;
+                                       rel1 { relative: 1.0 0.5; to_x: "spacer.left"; }
+                                       rel2 { relative: 0.0 0.5; to_x: "spacer.right"; }
                                        image.normal: PREDICTIVE_ARROW;
                                }
                        }
@@ -368,7 +359,7 @@ collections {
                }
        }
 
-       group { GROUP_SPEED_DIAL;
+       group { LAYOUT_SPEED_DIAL;
                parts {
                        spacer { "spacer.right"; scale;
                                desc { "default";
@@ -410,14 +401,11 @@ collections {
                        }
                        textblock { PART_NUMBER; scale;
                                desc { "default";
-                                       align: 0.0 0.5;
+                                       align: 1.0 0.5;
                                        min: SPEED_DIAL_NUMBER_W 0;
-                                       rel1 { relative: 1.0 0.0; to_x: "image.icon"; to_y: "spacer.middle"; }
-                                       rel2 { relative: 1.0 1.0; to_x: "image.icon"; to_y: "spacer.middle"; }
-                                       text {
-                                               align: 0.0 0.5;
-                                               style: "speed_dial_style";
-                                       }
+                                       rel1 { relative: 1.0 0.0; to: "spacer.middle"; }
+                                       rel2 { relative: 1.0 1.0; to: "spacer.middle"; }
+                                       text.style: "speed_dial_style";
                                }
                        }
                }
index bfc69c4..f052654 100644 (file)
@@ -140,14 +140,14 @@ void DialerView::onMenuPressed()
 void DialerView::fillLayout()
 {
        Evas_Object *layout = getEvasObject();
-       Eina_Bool res = elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_DIALER);
+       Eina_Bool res = elm_layout_file_set(layout, layoutFilePath.c_str(), LAYOUT_DIALER);
        WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
 
        elm_object_part_content_set(layout, PART_ENTRY, createEntry(layout));
        elm_object_part_content_set(layout, PART_PREDICTIVE, createSearchControl(layout));
        elm_object_part_content_set(layout, PART_KEYPAD, createKeypad(layout));
-       elm_object_part_content_set(layout, PART_CALL_BTN, createCallButton(layout));
-       elm_object_part_content_set(layout, PART_BACK_BTN, createBackspaceButton(layout));
+       elm_object_part_content_set(layout, PART_BUTTON_CALL, createCallButton(layout));
+       elm_object_part_content_set(layout, PART_BUTTON_BACK, createBackspaceButton(layout));
 }
 
 Evas_Object *DialerView::createEntry(Evas_Object *parent)
@@ -199,11 +199,11 @@ Evas_Object *DialerView::createCallButton(Evas_Object *parent)
                        makeCallback(&DialerView::onCallPressed), this);
 
        Evas_Object *edje = elm_layout_edje_get(button);
-       edje_object_color_class_set(edje, BUTTON_COLOR_CLASS_NORMAL, COLOR_CALL_BTN,
+       edje_object_color_class_set(edje, BUTTON_COLOR_CLASS_NORMAL, COLOR_BUTTON_CALL,
                        0, 0, 0, 0, 0, 0, 0, 0);
 
        Evas_Object *image = elm_image_add(button);
-       Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), GROUP_CALL_BTN);
+       Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), LAYOUT_BUTTON_CALL);
        WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
        evas_object_size_hint_min_set(image, iconSize, iconSize);
        elm_object_part_content_set(button, "elm.swallow.content", image);
@@ -221,7 +221,7 @@ Evas_Object *DialerView::createBackspaceButton(Evas_Object *parent)
        elm_object_style_set(button, "transparent");
 
        Evas_Object *image = elm_image_add(button);
-       Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), GROUP_BACK_BTN);
+       Eina_Bool res = elm_image_file_set(image, layoutFilePath.c_str(), LAYOUT_BUTTON_BACK);
        WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
        elm_object_part_content_set(button, "elm.swallow.content", image);
 
index c4855b4..4211852 100644 (file)
@@ -61,18 +61,18 @@ Evas_Object *KeypadButton::onCreate(Evas_Object *parent)
        static const std::string path = App::getResourcePath(DIALER_BUTTON_EDJ);
 
        Evas_Object *layout = elm_layout_add(parent);
-       Eina_Bool res = elm_layout_file_set(layout, path.c_str(), GROUP_BUTTON);
+       Eina_Bool res = elm_layout_file_set(layout, path.c_str(), LAYOUT_BUTTON);
        WARN_IF(res != EINA_TRUE, "elm_layout_file_set() failed");
 
        Evas_Object *image = elm_image_add(layout);
        elm_image_file_set(image, App::getResourcePath(m_Data->numberImage).c_str(), nullptr);
-       evas_object_color_set(image, COLOR_KEYPAD_BTN_NUMBER);
+       evas_object_color_set(image, COLOR_BUTTON_NUMBER);
        elm_object_part_content_set(layout, PART_NUMBER, image);
 
        if (m_Data->lettersImage) {
                image = elm_image_add(layout);
                elm_image_file_set(image, App::getResourcePath(m_Data->lettersImage).c_str(), nullptr);
-               evas_object_color_set(image, COLOR_KEYPAD_BTN_LETTERS);
+               evas_object_color_set(image, COLOR_BUTTON_LETTERS);
                elm_object_part_content_set(layout, PART_LETTERS, image);
        }
 
index 71c3dc2..479730d 100644 (file)
@@ -70,7 +70,7 @@ void SearchResultsControl::setSelectedCallback(SelectedCallback callback)
 Evas_Object *SearchResultsControl::onCreate(Evas_Object *parent)
 {
        Evas_Object *layout = elm_layout_add(parent);
-       elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_PREDICTIVE);
+       elm_layout_file_set(layout, layoutFilePath.c_str(), LAYOUT_PREDICTIVE);
 
        Evas_Object *edje = elm_layout_edje_get(layout);
        edje_object_signal_callback_add(edje, "mouse,clicked,*", PART_BG,
@@ -97,7 +97,7 @@ void SearchResultsControl::setResultsEmpty()
        if (m_State != ResultsEmpty) {
                m_State = ResultsEmpty;
 
-               Evas_Object *layout = setLayout(GROUP_NO_RESULTS);
+               Evas_Object *layout = setLayout(LAYOUT_NO_RESULTS);
                elm_object_translatable_part_text_set(layout, PART_ADD_TEXT, "IDS_KPD_BUTTON_ADD_TO_CONTACTS_ABB2");
        }
 }
@@ -106,7 +106,7 @@ void SearchResultsControl::setResultsPresent()
 {
        if (m_State != ResultsPresent && m_State != ResultsMany) {
                m_State = ResultsPresent;
-               setLayout(GROUP_RESULTS);
+               setLayout(LAYOUT_RESULTS);
        }
 
        setResultInfo(m_Results->front());
@@ -119,7 +119,7 @@ void SearchResultsControl::setResultsCount(size_t count)
                        m_State = ResultsMany;
 
                        m_ResultsCount = elm_layout_add(getEvasObject());
-                       elm_layout_file_set(m_ResultsCount, layoutFilePath.c_str(), GROUP_MORE_BTN);
+                       elm_layout_file_set(m_ResultsCount, layoutFilePath.c_str(), LAYOUT_BUTTON_MORE);
 
                        Evas_Object *edje = elm_layout_edje_get(m_ResultsCount);
                        edje_object_signal_callback_add(edje, "mouse,clicked,*", PART_BG,
@@ -133,7 +133,7 @@ void SearchResultsControl::setResultsCount(size_t count)
                m_State = ResultsPresent;
        }
 
-       elm_object_part_content_set(getLayout(), PART_MORE_BTN, m_ResultsCount);
+       elm_object_part_content_set(getLayout(), PART_BUTTON_MORE, m_ResultsCount);
 }
 
 void SearchResultsControl::setResultInfo(SearchResultPtr result)
@@ -160,7 +160,7 @@ void SearchResultsControl::setResultSpeedDial(SearchResultPtr result)
        Evas_Object *layout = nullptr;
        if (result->getSpeedDialId()) {
                layout = elm_layout_add(getEvasObject());
-               elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_SPEED_DIAL);
+               elm_layout_file_set(layout, layoutFilePath.c_str(), LAYOUT_SPEED_DIAL);
                elm_object_part_text_set(layout, PART_NUMBER, std::to_string(result->getSpeedDialId()).c_str());
        }