# EDC Flags
USER_EXT_EDC_KEYS = EDC0
-USER_EXT_EDC0_EDCS = res/widget/edje/widget-layout.edc res/widget/edje/widget-item-layout.edc
+USER_EXT_EDC0_EDCS = res/widget/edje/widget-item-layout.edc
USER_EXT_EDC0_EDCS_IMAGE_DIRS = edje
USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS =
USER_EXT_EDC0_EDCS_SOUND_DIRS = edje
-set(EDC_FILES widget-layout.edc widget-item-layout.edc)
+set(EDC_FILES widget-item-layout.edc)
set(EDJ_DIR "${RES_DIR}/widget/edje")
set(IMG_DIR "${RES_DIR}/widget/images")
#define WIDGET_IMG_DIR "widget/images/"
#define WIDGET_EDJ_DIR "widget/edje/"
-#define WIDGET_LAYOUT_EDJ WIDGET_EDJ_DIR"widget-layout.edj"
#define WIDGET_ITEM_LAYOUT_EDJ WIDGET_EDJ_DIR"widget-item-layout.edj"
-#define NO_CONTENTS_BG WIDGET_IMG_DIR"nocontacts_bg.#.png"
-#define NO_CONTENTS_BORDER WIDGET_IMG_DIR"nocontacts_bg_stroke.#.png"
-
#define BUTTON_ADD_ICON WIDGET_IMG_DIR"add_contact_icon.png"
#define BUTTON_ADD_BG WIDGET_IMG_DIR"add_contact_bg.png"
#define BUTTON_ADD_BORDER WIDGET_IMG_DIR"add_contact_bg_ef.png"
#include "Utils/Logger.h"
#include "AppsCommonButtons.h"
+#include "AppsCommonWidget.h"
#include "AddButtonItem.h"
#include "WidgetItemLayout.h"
-#include "WidgetLayout.h"
#include <notification.h>
namespace
{
- const std::string layoutPath = App::getResourcePath(WIDGET_LAYOUT_EDJ);
+ const std::string layoutPath = App::getResourcePath(APPS_COMMON_WIDGET_EDJ);
}
Widget::Widget()
elm_layout_signal_callback_add(layout, "mouse,clicked,*", "*",
(Edje_Signal_Cb) makeCallback(&Widget::onAddPressed), this);
- elm_object_translatable_part_text_set(layout, PART_TITLE,
+ elm_object_translatable_part_text_set(layout, "elm.text",
"IDS_PB_BODY_CONTACTS");
- elm_object_translatable_part_text_set(layout, PART_HELP,
+ elm_object_translatable_part_text_set(layout, "elm.help.text",
"IDS_PB_NPBODY_TAP_HERE_TO_ADD_SHORTCUT");
return layout;
Evas_Object *Widget::createLayout(Evas_Object *parent)
{
Evas_Object *layout = elm_layout_add(parent);
- elm_layout_file_set(layout, layoutPath.c_str(), LAYOUT_MAIN);
- elm_object_part_content_set(layout, PART_BUTTON_EDIT, createEditButton(layout));
+ elm_layout_file_set(layout, layoutPath.c_str(), LAYOUT_CONTENT);
+ elm_object_part_content_set(layout, PART_BUTTON, createEditButton(layout));
elm_object_part_content_set(layout, PART_CONTENT, createGengrid(layout));
return layout;
evas_object_smart_callback_add(m_EditButton, "clicked",
makeCallback(&Widget::onEditPressed), this);
- Evas_Object *edje = elm_layout_edje_get(m_EditButton);
- edje_object_color_class_set(edje, BUTTON_COLOR_CLASS_NORMAL, COLOR_BUTTON_EDIT_NORMAL,
- 0, 0, 0, 0, 0, 0, 0, 0);
- edje_object_text_class_set(edje, "button_text",
- "font=Tizen:style=Regular", BUTTON_TEXT_SIZE);
-
return m_EditButton;
}
# EDC Flags
USER_EXT_EDC_KEYS = EDC0
-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 = res/apps-common/edje/apps-common-buttons.edc res/apps-common/edje/apps-common-popup.edc res/apps-common/edje/apps-common-thumbnail.edc res/apps-common/edje/apps-common-widget.edc
USER_EXT_EDC0_EDCS_IMAGE_DIRS = edje
USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS =
USER_EXT_EDC0_EDCS_SOUND_DIRS = edje
-set(EDCFILES apps-common-buttons.edc apps-common-popup.edc apps-common-thumbnail.edc)
+set(EDCFILES apps-common-buttons.edc apps-common-popup.edc apps-common-thumbnail.edc apps-common-widget.edc)
set(EDJDIR "${RES_DIR}/apps-common/edje")
foreach(EDCFILE ${EDCFILES})
* limitations under the License.
*/
-#ifndef WIDGET_LAYOUT_H
-#define WIDGET_LAYOUT_H
+#ifndef APPS_COMMON_WIDGET_H
+#define APPS_COMMON_WIDGET_H
-#include "WidgetPath.h"
+#include "AppsCommonPath.h"
-#define LAYOUT_NO_CONTENTS "no_contents"
-#define LAYOUT_MAIN "main"
+#define APPS_COMMON_WIDGET_EDJ APPS_COMMON_EDJ_DIR"apps-common-widget.edj"
-#define PART_TITLE "text.title"
-#define PART_HELP "text.help"
+#define NO_CONTENTS_BG APPS_COMMON_IMG_DIR"widget_no_contents_bg.#.png"
+#define NO_CONTENTS_BORDER APPS_COMMON_IMG_DIR"widget_no_contents_bg_stroke.#.png"
-#define PART_BUTTON_EDIT "swallow.button_edit"
-#define PART_CONTENT "swallow.content"
+#define LAYOUT_NO_CONTENTS "no_contents"
+#define LAYOUT_CONTENT "content"
-#define BUTTON_TEXT_SIZE 32
-#define COLOR_BUTTON_EDIT_NORMAL 0, 0, 0, 90
+#define PART_BUTTON "swallow.button"
+#define PART_CONTENT "swallow.content"
-#endif /* WIDGET_LAYOUT_H */
+#endif /* APPS_COMMON_WIDGET_H */
}
}
}
+ programs {
+ program {
+ name: "loaded";
+ signal: "load";
+ source: "*";
+ script {
+ set_float(effect_scale, 0.7);
+ set_color_class(BUTTON_COLOR_CLASS_NORMAL, 0, 0, 0, 90);
+ set_text_class(BUTTON_TEXT_CLASS, "font=Tizen:style=Regular", 32);
+ }
+ }
+ }
}
group { "elm/button/base/"STYLE_BUTTON_CUSTOM_CIRCLE;
* limitations under the License.
*/
-#include "WidgetLayout.h"
-#include "../../../../lib-apps-common/res/apps-common/edje/apps-common-utils.edc"
+#include "AppsCommonWidget.h"
+#include "apps-common-utils.edc"
-#define TITLE_H 107
-#define TITLE_T 72
-#define TITLE_TEXT_SIZE 80
+#define TEXT_H 107
+#define TEXT_T 72
+#define TEXT_SIZE 80
#define HELP_H 52
#define HELP_T 15
#define HELP_TEXT_SIZE 38
-#define BUTTON_EDIT_H 52
-#define BUTTON_EDIT_R 14
+#define BUTTON_R 14
+#define CONTENT_T 10
styles {
style {
- name: "no_contents_title";
- base: "font=Tizen:style=Condensed font_size="TITLE_TEXT_SIZE" align=center color=#fafafa style=shadow,bottom_right shadow_color=#00000066";
+ name: "no_contents_text";
+ base: "font=Tizen:style=Condensed font_size="TEXT_SIZE" align=center color=#fafafa style=shadow,bottom_right shadow_color=#00000066";
}
style {
- name: "no_contents_text";
+ name: "no_contents_help";
base: "font=Tizen:style=Regular font_size="HELP_TEXT_SIZE" align=center color=#fafafa style=shadow,bottom_right shadow_color=#00000066";
}
}
}
spacer { "spacer.text.top"; scale;
desc { "default";
- min: 0 TITLE_T;
+ min: 0 TEXT_T;
align: 0.5 0.0;
- rel1.relative: 0.0 0.0;
rel2.relative: 1.0 0.0;
}
}
- textblock { PART_TITLE; scale;
+ textblock { "elm.text"; scale;
desc { "default";
- min: 0 TITLE_H;
+ min: 0 TEXT_H;
align: 0.5 0.0;
rel1 { relative: 0.0 1.0; to_y: "spacer.text.top"; }
rel2 { relative: 1.0 1.0; to_y: "spacer.text.top"; }
- text {
- align: 0.5 0.0;
- style: "no_contents_title";
- }
+ text.style: "no_contents_text";
}
}
spacer { "spacer.help.top"; scale;
desc { "default";
min: 0 HELP_T;
align: 0.5 0.0;
- rel1 { relative: 0.0 1.0; to_y: PART_TITLE; }
- rel2 { relative: 1.0 1.0; to_y: PART_TITLE; }
+ rel1 { relative: 0.0 1.0; to_y: "elm.text"; }
+ rel2 { relative: 1.0 1.0; to_y: "elm.text"; }
}
}
- textblock { PART_HELP; scale;
+ textblock { "elm.help.text"; scale;
desc { "default";
min: 0 HELP_H;
align: 0.5 0.0;
rel1 { relative: 0.0 1.0; to_y: "spacer.help.top"; }
rel2 { relative: 1.0 1.0; to_y: "spacer.help.top"; }
- text {
- align: 0.5 0.0;
- style: "no_contents_text";
- }
+ text.style: "no_contents_help";
}
}
programs {
}
}
- group { LAYOUT_MAIN;
+ group { LAYOUT_CONTENT;
parts {
- spacer { "spacer.button_edit.right"; scale;
+ spacer { "spacer.button.right"; scale;
desc { "default";
- min: BUTTON_EDIT_R 0;
+ min: BUTTON_R 0;
align: 1.0 0.5;
rel1.relative: 1.0 0.0;
- rel2.relative: 1.0 1.0;
}
}
- swallow { PART_BUTTON_EDIT; scale;
+ swallow { PART_BUTTON;
desc { "default";
- min: 0 BUTTON_EDIT_H;
align: 1.0 0.0;
- rel1 { relative: 0.0 0.0; to_x: "spacer.button_edit.right"; }
- rel2 { relative: 0.0 0.0; to_x: "spacer.button_edit.right"; }
+ rel1 { relative: 0.0 0.0; to_x: "spacer.button.right"; }
+ rel2 { relative: 0.0 0.0; to_x: "spacer.button.right"; }
+ }
+ }
+ spacer { "spacer.content.top"; scale;
+ desc { "default";
+ min: 0 CONTENT_T;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.0; to_y: PART_BUTTON; }
+ rel2 { relative: 1.0 1.0; to_y: PART_BUTTON; }
}
}
- swallow { PART_CONTENT; scale;
+ swallow { PART_CONTENT;
desc { "default";
align: 0.5 0.0;
- rel1 { relative: 0.0 1.0; to_y: PART_BUTTON_EDIT; }
- rel2 { relative: 1.0 1.0; }
+ rel1 { relative: 0.0 1.0; to_y: "spacer.content.top"; }
}
}
}