Updated layout naming style in "lib-apps-common". 97/87997/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 12 Sep 2016 11:49:13 +0000 (14:49 +0300)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 12 Sep 2016 11:49:13 +0000 (14:49 +0300)
Merged "progressbar_layout" with other popup layouts.

Change-Id: I6b3ceefa194437ea271e264acbff1fc0ff0e3ca6
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
18 files changed:
contacts-widget/src/Widget.cpp
lib-apps-common/project_def.prop
lib-apps-common/res/apps-common/CMakeLists.txt
lib-apps-common/res/apps-common/edje/AppsCommonButtons.h
lib-apps-common/res/apps-common/edje/AppsCommonPopup.h
lib-apps-common/res/apps-common/edje/AppsCommonProgressbarLayout.h [deleted file]
lib-apps-common/res/apps-common/edje/AppsCommonThumbnail.h
lib-apps-common/res/apps-common/edje/apps-common-buttons.edc
lib-apps-common/res/apps-common/edje/apps-common-popup.edc
lib-apps-common/res/apps-common/edje/apps-common-progressbar-layout.edc [deleted file]
lib-apps-common/res/apps-common/edje/apps-common-thumbnail.edc
lib-apps-common/src/Ui/ProcessPopup.cpp
lib-apps-common/src/Ui/ProgressPopup.cpp
lib-apps-common/src/Ui/Thumbnail.cpp
lib-contacts/src/Contacts/Groups/CreateGroupItem.cpp
lib-contacts/src/Contacts/Input/ContactDateFieldControl.cpp
lib-logs/src/Logs/Details/BasicInfoItem.cpp
lib-phone/src/Phone/Dialer/DialerView.cpp

index 0e4b919..25cbf78 100644 (file)
@@ -143,7 +143,7 @@ Evas_Object *Widget::createGengrid(Evas_Object *parent)
 Evas_Object *Widget::createEditButton(Evas_Object *parent)
 {
        m_EditButton = elm_button_add(parent);
-       elm_object_style_set(m_EditButton, BUTTON_STYLE_CUSTOM_SMALL);
+       elm_object_style_set(m_EditButton, STYLE_BUTTON_CUSTOM_SMALL);
        elm_object_translatable_text_set(m_EditButton, "IDS_HS_ACBUTTON_EDIT");
        evas_object_smart_callback_add(m_EditButton, "clicked",
                        makeCallback(&Widget::onEditPressed), this);
index 60b51da..495c677 100644 (file)
@@ -60,7 +60,7 @@ USER_EDCS_FONT_DIRS_ABS =
 # EDC Flags
 USER_EXT_EDC_KEYS = EDC0
 
-USER_EXT_EDC0_EDCS = res/apps-common/edje/apps-common-thumbnail.edc res/apps-common/edje/apps-common-progressbar-layout.edc res/apps-common/edje/apps-common-popup.edc res/apps-common/edje/apps-common-buttons.edc
+USER_EXT_EDC0_EDCS = res/apps-common/edje/apps-common-buttons.edc res/apps-common/edje/apps-common-popup.edc res/apps-common/edje/apps-common-thumbnail.edc
 USER_EXT_EDC0_EDCS_IMAGE_DIRS = res
 USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS =
 USER_EXT_EDC0_EDCS_SOUND_DIRS = edje/sounds
index 23ef924..6c78099 100644 (file)
@@ -1,4 +1,4 @@
-set(EDCFILES apps-common-thumbnail.edc apps-common-buttons.edc apps-common-progressbar-layout.edc apps-common-popup.edc)
+set(EDCFILES apps-common-buttons.edc apps-common-popup.edc apps-common-thumbnail.edc)
 set(EDJDIR "${RES_DIR}/apps-common/edje")
 
 foreach(EDCFILE ${EDCFILES})
index a196416..3bc4af2 100644 (file)
 
 #include "AppsCommonPath.h"
 
-#define APPS_COMMON_BUTTONS_EDJ          APPS_COMMON_EDJ_DIR"apps-common-buttons.edj"
+#define APPS_COMMON_BUTTONS_EDJ     APPS_COMMON_EDJ_DIR"apps-common-buttons.edj"
 
-#define BUTTON_STYLE_CUSTOM_DEFAULT "custom_default"
-#define BUTTON_STYLE_CUSTOM_SMALL   "custom_small"
-#define BUTTON_STYLE_CUSTOM_CIRCLE  "custom_circle"
+#define STYLE_BUTTON_CUSTOM_DEFAULT "custom_default"
+#define STYLE_BUTTON_CUSTOM_SMALL   "custom_small"
+#define STYLE_BUTTON_CUSTOM_CIRCLE  "custom_circle"
 
 #define BUTTON_TEXT_CLASS           "button_text"
 #define BUTTON_COLOR_CLASS_NORMAL   "button_normal"
index 6cbac51..fea1226 100644 (file)
@@ -22,7 +22,8 @@
 
 #define APPS_COMMON_POPUP_EDJ APPS_COMMON_EDJ_DIR"apps-common-popup.edj"
 
-#define GROUP_PROCESS_SMALL  "process_small"
-#define GROUP_PROCESS_MEDIUM "process_medium"
+#define LAYOUT_PROGRESS       "progress"
+#define LAYOUT_PROCESS_SMALL  "process_small"
+#define LAYOUT_PROCESS_MEDIUM "process_medium"
 
 #endif /* APPS_COMMON_POPUP_H */
diff --git a/lib-apps-common/res/apps-common/edje/AppsCommonProgressbarLayout.h b/lib-apps-common/res/apps-common/edje/AppsCommonProgressbarLayout.h
deleted file mode 100644 (file)
index b95279c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2015-2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef APPS_COMMON_PROGRESSBAR_LAYOUT_H
-#define APPS_COMMON_PROGRESSBAR_LAYOUT_H
-
-#include "AppsCommonPath.h"
-
-#define APPS_COMMON_PROGRESSBAR_LAYOUT_EDJ APPS_COMMON_EDJ_DIR"apps-common-progressbar-layout.edj"
-
-#define GROUP_PROGRESSBAR_LAYOUT "progressbar_layout"
-#define PART_PROGRESSBAR         "swallow.progressbar"
-
-#endif /* APPS_COMMON_PROGRESSBAR_LAYOUT_H */
index 70384b7..db4eb1e 100644 (file)
 #define THUMBNAIL_MASK_MEDIUM           APPS_COMMON_IMG_DIR"contacts_caller_id_default_masking_05.png"
 #define THUMBNAIL_MASK_LARGE            APPS_COMMON_IMG_DIR"contacts_caller_id_default_masking_04.png"
 
-#define GROUP_THUMBNAIL_SMALL           "thumbnail_small"
-#define GROUP_THUMBNAIL_MEDIUM          "thumbnail_medium"
-#define GROUP_THUMBNAIL_LARGE           "thumbnail_large"
+#define LAYOUT_THUMBNAIL_SMALL           "thumbnail_small"
+#define LAYOUT_THUMBNAIL_MEDIUM          "thumbnail_medium"
+#define LAYOUT_THUMBNAIL_LARGE           "thumbnail_large"
 
-#define GROUP_THUMBNAIL_DEFAULT_SMALL   "default_thumbnail_small"
-#define GROUP_THUMBNAIL_DEFAULT_MEDIUM  "default_thumbnail_medium"
-#define GROUP_THUMBNAIL_DEFAULT_LARGE   "default_thumbnail_large"
+#define LAYOUT_THUMBNAIL_DEFAULT_SMALL   "default_thumbnail_small"
+#define LAYOUT_THUMBNAIL_DEFAULT_MEDIUM  "default_thumbnail_medium"
+#define LAYOUT_THUMBNAIL_DEFAULT_LARGE   "default_thumbnail_large"
 
 #define THUMBNAIL_SMALL_SIZE 98
 #define THUMBNAIL_MEDIUM_SIZE 180
index 3209646..69149f0 100644 (file)
@@ -103,7 +103,7 @@ collections {
                }
        }
 
-       group { "elm/button/base/"BUTTON_STYLE_CUSTOM_DEFAULT;
+       group { "elm/button/base/"STYLE_BUTTON_CUSTOM_DEFAULT;
                inherit: "elm/button/base/custom";
                data.item: "vector_ux" "default";
                data.item: "corner_radius" BUTTON_CORNER_RADIUS;
@@ -140,8 +140,8 @@ collections {
                }
        }
 
-       group { "elm/button/base/"BUTTON_STYLE_CUSTOM_SMALL;
-               inherit: "elm/button/base/"BUTTON_STYLE_CUSTOM_DEFAULT;
+       group { "elm/button/base/"STYLE_BUTTON_CUSTOM_SMALL;
+               inherit: "elm/button/base/"STYLE_BUTTON_CUSTOM_DEFAULT;
                data.item: "vector_ux" "default";
                data.item: "corner_radius" BUTTON_SMALL_CORNER_RADIUS;
 
@@ -164,7 +164,7 @@ collections {
                }
        }
 
-       group { "elm/button/base/"BUTTON_STYLE_CUSTOM_CIRCLE;
+       group { "elm/button/base/"STYLE_BUTTON_CUSTOM_CIRCLE;
                inherit: "elm/button/base/custom";
                data.item: "vector_ux" "circle";
 
index 6b9432e..0241410 100644 (file)
@@ -17,6 +17,9 @@
 
 #include "AppsCommonPopup.h"
 
+#define PROGRESS_LR 32
+#define PROGRESS_TB 17
+
 #define PROCESS_SMALL_POPUP_H 78
 #define PROCESS_SMALL_PROGRESS_LR 32
 #define PROCESS_SMALL_PROGRESS_WH 44
@@ -41,7 +44,34 @@ styles {
 collections {
        base_scale: 2.6;
 
-       group { GROUP_PROCESS_SMALL;
+       group { LAYOUT_PROGRESS;
+               parts {
+                       spacer { "spacer.left_top"; scale;
+                               desc { "default";
+                                       min: PROGRESS_LR PROGRESS_TB;
+                                       align: 0.0 0.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 0.0 0.0;
+                               }
+                       }
+                       spacer { "spacer.right_bottom"; scale;
+                               desc { "default";
+                                       min: PROGRESS_LR PROGRESS_TB;
+                                       align: 1.0 1.0;
+                                       rel1.relative: 1.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       swallow { "elm.swallow.content"; scale;
+                               desc { "default";
+                                       rel1 { relative: 1.0 1.0; to: "spacer.left_top"; }
+                                       rel2 { relative: 0.0 0.0; to: "spacer.right_bottom"; }
+                               }
+                       }
+               }
+       }
+
+       group { LAYOUT_PROCESS_SMALL;
                parts {
                        spacer { "spacer.base"; scale;
                                desc { "default";
@@ -83,7 +113,7 @@ collections {
                }
        }
 
-       group { GROUP_PROCESS_MEDIUM;
+       group { LAYOUT_PROCESS_MEDIUM;
                parts {
                        spacer { "spacer.base"; scale;
                                desc { "default";
diff --git a/lib-apps-common/res/apps-common/edje/apps-common-progressbar-layout.edc b/lib-apps-common/res/apps-common/edje/apps-common-progressbar-layout.edc
deleted file mode 100644 (file)
index 09ad436..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2015-2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "AppsCommonProgressbarLayout.h"
-
-#define PROGRESSBAR_LR 32
-#define PROGRESSBAR_TB 17
-
-collections {
-       base_scale: 2.6;
-       group { GROUP_PROGRESSBAR_LAYOUT;
-               parts {
-                       spacer { "spacer.left_top"; scale;
-                               desc { "default";
-                                       min: PROGRESSBAR_LR PROGRESSBAR_TB;
-                                       align: 0.0 0.0;
-                                       rel1.relative: 0.0 0.0;
-                                       rel2.relative: 0.0 0.0;
-                               }
-                       }
-                       spacer { "spacer.right_bottom"; scale;
-                               desc { "default";
-                                       min: PROGRESSBAR_LR PROGRESSBAR_TB;
-                                       align: 1.0 1.0;
-                                       rel1.relative: 1.0 1.0;
-                                       rel2.relative: 1.0 1.0;
-                               }
-                       }
-                       swallow { PART_PROGRESSBAR; scale;
-                               desc { "default";
-                                       rel1 { relative: 1.0 1.0; to: "spacer.left_top"; }
-                                       rel2 { relative: 0.0 0.0; to: "spacer.right_bottom"; }
-                               }
-                       }
-               }
-       }
-}
\ No newline at end of file
index 87a2799..82e9db8 100644 (file)
 #include "apps-common-utils.edc"
 
 collections {
-       IMAGE_WITH_MASK(GROUP_THUMBNAIL_SMALL, THUMBNAIL_MASK_SMALL)
-       IMAGE_WITH_MASK(GROUP_THUMBNAIL_MEDIUM, THUMBNAIL_MASK_MEDIUM)
-       IMAGE_WITH_MASK(GROUP_THUMBNAIL_LARGE, THUMBNAIL_MASK_LARGE)
+       IMAGE_WITH_MASK(LAYOUT_THUMBNAIL_SMALL, THUMBNAIL_MASK_SMALL)
+       IMAGE_WITH_MASK(LAYOUT_THUMBNAIL_MEDIUM, THUMBNAIL_MASK_MEDIUM)
+       IMAGE_WITH_MASK(LAYOUT_THUMBNAIL_LARGE, THUMBNAIL_MASK_LARGE)
 
-       IMAGE_WITH_COLOR_AND_BG(GROUP_THUMBNAIL_DEFAULT_SMALL, THUMBNAIL_DEFAULT_SMALL, "thumbnail_default", THUMBNAIL_BG_SMALL, "thumbnail_bg")
-       IMAGE_WITH_COLOR_AND_BG(GROUP_THUMBNAIL_DEFAULT_MEDIUM, THUMBNAIL_DEFAULT_MEDIUM, "thumbnail_default", THUMBNAIL_BG_MEDIUM, "thumbnail_bg")
-       IMAGE_WITH_COLOR_AND_BG(GROUP_THUMBNAIL_DEFAULT_LARGE, THUMBNAIL_DEFAULT_LARGE, "thumbnail_default", THUMBNAIL_BG_LARGE, "thumbnail_bg")
+       IMAGE_WITH_COLOR_AND_BG(LAYOUT_THUMBNAIL_DEFAULT_SMALL, THUMBNAIL_DEFAULT_SMALL, "thumbnail_default", THUMBNAIL_BG_SMALL, "thumbnail_bg")
+       IMAGE_WITH_COLOR_AND_BG(LAYOUT_THUMBNAIL_DEFAULT_MEDIUM, THUMBNAIL_DEFAULT_MEDIUM, "thumbnail_default", THUMBNAIL_BG_MEDIUM, "thumbnail_bg")
+       IMAGE_WITH_COLOR_AND_BG(LAYOUT_THUMBNAIL_DEFAULT_LARGE, THUMBNAIL_DEFAULT_LARGE, "thumbnail_default", THUMBNAIL_BG_LARGE, "thumbnail_bg")
 }
index aca1458..d05790a 100644 (file)
@@ -77,8 +77,8 @@ Evas_Object *ProcessPopup::onCreate(Evas_Object *parent)
                const char *layout;
                const char *progress;
        } styles[] = {
-               /* SizeSmall  = */ { GROUP_PROCESS_SMALL,  "process_small"  },
-               /* SizeMedium = */ { GROUP_PROCESS_MEDIUM, "process_medium" }
+               /* SizeSmall  = */ { LAYOUT_PROCESS_SMALL,  "process_small"  },
+               /* SizeMedium = */ { LAYOUT_PROCESS_MEDIUM, "process_medium" }
        };
 
        Evas_Object *popup = Popup::onCreate(parent);
index aca953f..5fdd84a 100644 (file)
@@ -19,7 +19,7 @@
 #include "Ui/ProgressPopup.h"
 #include "Utils/Logger.h"
 
-#include "AppsCommonProgressbarLayout.h"
+#include "AppsCommonPopup.h"
 
 #define BUFFER_SIZE        64
 
@@ -29,7 +29,7 @@ using namespace Ui;
 
 namespace
 {
-       const std::string layoutFilePath = App::getResourcePath(APPS_COMMON_PROGRESSBAR_LAYOUT_EDJ);
+       const std::string layoutFilePath = App::getResourcePath(APPS_COMMON_POPUP_EDJ);
 }
 
 ProgressPopup::ProgressPopup(size_t maxValue)
@@ -58,7 +58,7 @@ Evas_Object *ProgressPopup::onCreate(Evas_Object *parent)
        Evas_Object *popup = Popup::onCreate(parent);
 
        Evas_Object *layout = elm_layout_add(popup);
-       elm_layout_file_set(layout, layoutFilePath.c_str(), GROUP_PROGRESSBAR_LAYOUT);
+       elm_layout_file_set(layout, layoutFilePath.c_str(), LAYOUT_PROGRESS);
 
        m_Progressbar = elm_progressbar_add(layout);
        elm_progressbar_pulse(m_Progressbar, EINA_TRUE);
@@ -68,7 +68,7 @@ Evas_Object *ProgressPopup::onCreate(Evas_Object *parent)
        elm_object_part_text_set(m_Progressbar, "elm.text.bottom.left", ZERO_PROGRESS);
        elm_object_part_text_set(m_Progressbar, "elm.text.bottom.right", total);
 
-       elm_object_part_content_set(layout, PART_PROGRESSBAR, m_Progressbar);
+       elm_object_content_set(layout, m_Progressbar);
        elm_object_content_set(popup, layout);
 
        return popup;
index 0200041..b7b1700 100644 (file)
@@ -30,9 +30,9 @@ namespace
                const char *groupMask;
                const char *groupDefault;
        } params[] = {
-               { GROUP_THUMBNAIL_SMALL, GROUP_THUMBNAIL_DEFAULT_SMALL },
-               { GROUP_THUMBNAIL_MEDIUM, GROUP_THUMBNAIL_DEFAULT_MEDIUM },
-               { GROUP_THUMBNAIL_LARGE, GROUP_THUMBNAIL_DEFAULT_LARGE }
+               { LAYOUT_THUMBNAIL_SMALL, LAYOUT_THUMBNAIL_DEFAULT_SMALL },
+               { LAYOUT_THUMBNAIL_MEDIUM, LAYOUT_THUMBNAIL_DEFAULT_MEDIUM },
+               { LAYOUT_THUMBNAIL_LARGE, LAYOUT_THUMBNAIL_DEFAULT_LARGE }
        };
 
        const std::string layoutPath = App::getResourcePath(APPS_COMMON_THUMBNAIL_EDJ);
index bb9af3c..72399cf 100644 (file)
@@ -54,7 +54,7 @@ Evas_Object *CreateGroupItem::getContent(Evas_Object *parent, const char *part)
        evas_object_size_hint_min_set(box, 0, Ui::getScaledValue(ITEM_H));
 
        Evas_Object *button = elm_button_add(box);
-       elm_object_style_set(button, BUTTON_STYLE_CUSTOM_DEFAULT);
+       elm_object_style_set(button, STYLE_BUTTON_CUSTOM_DEFAULT);
        elm_object_translatable_text_set(button, "IDS_PB_BUTTON_CREATE_GROUP_ABB");
        evas_object_smart_callback_add(button, "clicked",
                        makeCallback(&CreateGroupItem::onButtonPressed), this);
index 2d09540..57be91c 100644 (file)
@@ -46,7 +46,7 @@ Evas_Object *ContactDateFieldControl::onCreate(Evas_Object *parent)
        Evas_Object *box = elm_box_add(parent);
 
        m_Button = elm_button_add(box);
-       elm_object_style_set(m_Button, BUTTON_STYLE_CUSTOM_DEFAULT);
+       elm_object_style_set(m_Button, STYLE_BUTTON_CUSTOM_DEFAULT);
        evas_object_smart_callback_add(m_Button, "clicked",
                        makeCallback(&ContactDateFieldControl::onButtonPressed), this);
 
index cc73e5f..b62490c 100644 (file)
@@ -27,6 +27,7 @@
 #include "Logs/Model/LogGroup.h"
 #include "Logs/Model/Log.h"
 
+#include "AppsCommonButtons.h"
 #include "LogsDetailsItemLayout.h"
 #include "LogsDetailsItemLayoutMetrics.h"
 
@@ -118,7 +119,7 @@ Evas_Object *BasicInfoItem::createUnsavedButtons(Evas_Object *parent)
 Evas_Object *BasicInfoItem::createUnsavedButton(Evas_Object *box, const char *text, Evas_Smart_Cb func)
 {
        Evas_Object *button = elm_button_add(box);
-       elm_object_style_set(button, "custom_default");
+       elm_object_style_set(button, STYLE_BUTTON_CUSTOM_DEFAULT);
 
        Evas_Object *edje = elm_layout_edje_get(button);
        edje_object_color_class_set(edje, BUTTON_COLOR_CLASS_NORMAL, COLOR_UNSAVED_BUTTON_NORMAL,
index eb83ce9..bfc69c4 100644 (file)
@@ -194,7 +194,7 @@ Evas_Object *DialerView::createCallButton(Evas_Object *parent)
        elm_theme_extension_add(nullptr, App::getResourcePath(APPS_COMMON_BUTTONS_EDJ).c_str());
 
        Evas_Object *button = elm_button_add(parent);
-       elm_object_style_set(button, BUTTON_STYLE_CUSTOM_CIRCLE);
+       elm_object_style_set(button, STYLE_BUTTON_CUSTOM_CIRCLE);
        evas_object_smart_callback_add(button, "clicked",
                        makeCallback(&DialerView::onCallPressed), this);