TizenRefApp-7165 [Email] Implement Download all and Show Image button in Viewer accor... 07/88107/4
authorAndriy Kolesnichenko <a.kolesniche@samsung.com>
Mon, 12 Sep 2016 17:09:27 +0000 (20:09 +0300)
committerAndriy Kolesnichenko <a.kolesniche@samsung.com>
Fri, 16 Sep 2016 10:52:25 +0000 (13:52 +0300)
Change-Id: I3dc290b518dc06dee18976f9db48c13892f53ed5
Signed-off-by: Andriy Kolesnichenko <a.kolesniche@samsung.com>
edc/common/email-flat-buttons.edc
edc/composer/email-composer-recipients.edc
edc/composer/email-composer-rich-text.edc
edc/composer/email-composer-subject.edc
edc/filter/email-filter-address-edit-view.edc
edc/mailbox/email-mailbox-theme.edc
edc/viewer/email-viewer-base-layout.edc
edc/viewer/email-viewer-subject-layout.edc
modules/viewer/inc/email-viewer.h
modules/viewer/src/email-viewer-util.c
modules/viewer/src/email-viewer.c

index ff33af1..7d854fe 100644 (file)
@@ -25,11 +25,13 @@ plugins {
 
 #define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
 #define FLAT_SQUARE_BTN_CORNER_RADIUS "10"
+#define BTN_EFFECT_READY_COLOR 61 185 204 0
+#define BTN_EFFECT_PRESS_COLOR 61 185 204 77
 
 /**
  * @brief Macros to generate styles for button with icon inside with support of click VI effect and sound.
  */
-#define FLAT_CIRCLE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
+#define FLAT_CIRCLE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, vg_effect_start_koeff, vg_effect_end_koeff) \
        group { name: "elm/button/base/email.flat.circle."style_name; \
                data.item: "vector_ux" "no_bg/circle"; \
                images { \
@@ -45,7 +47,7 @@ plugins {
                        public get_circumscription_radius(base_effect, radius_w, radius_h) { \
                                new x, y, w, h, Float:radius; \
                                get_geometry(base_effect, x, y, w, h); \
-                               radius = sqrt(pow(w, 2) + pow(h, 2)); \
+                               radius = vg_effect_start_koeff * sqrt(pow(w, 2) + pow(h, 2)); \
                                set_float(radius_w, ((radius / w) - 1) / 2); \
                                set_float(radius_h, ((radius / h) - 1) / 2); \
                        } \
@@ -84,8 +86,8 @@ plugins {
                                } \
                                description { state: "pressed" 0.0; \
                                        inherit: "ready" 0.0; \
-                                       rel1.relative: -0.15 -0.15; \
-                                       rel2.relative: 1.15 1.15; \
+                                       rel1.relative: ((1.0 - vg_effect_end_koeff) / 2.0) ((1.0 - vg_effect_end_koeff) / 2.0); \
+                                       rel2.relative: (1.0 + (vg_effect_end_koeff - 1.0) / 2.0) (1.0 + (vg_effect_end_koeff - 1.0) / 2.0); \
                                } \
                        } \
                        part { name: "tizen_vg_shape_clipper"; \
@@ -99,12 +101,12 @@ plugins {
                                } \
                                description { state: "ready" 0.0; \
                                        inherit: "default" 0.0; \
-                                       color: 61 185 204 0; \
+                                       color: BTN_EFFECT_READY_COLOR; \
                                        visible: 1; \
                                } \
                                description { state: "pressed" 0.0; \
                                        inherit: "default" 0.0; \
-                                       color: 61 185 204 77; \
+                                       color: BTN_EFFECT_PRESS_COLOR; \
                                        visible: 1; \
                                } \
                        } \
@@ -389,12 +391,12 @@ plugins {
                                } \
                                description { state: "ready" 0.0; \
                                        inherit: "default" 0.0; \
-                                       color: 61 185 204 0; \
+                                       color: BTN_EFFECT_READY_COLOR; \
                                        visible: 1; \
                                } \
                                description { state: "pressed" 0.0; \
                                        inherit: "default" 0.0; \
-                                       color: 61 185 204 77; \
+                                       color: BTN_EFFECT_PRESS_COLOR; \
                                        visible: 1; \
                                } \
                        } \
@@ -592,5 +594,316 @@ plugins {
                } \
        }
 
-#define FLAT_SQUARE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, vg_effect_start_koeff, vg_effect_end_koeff) \
-       FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, vg_effect_start_koeff, vg_effect_end_koeff,)
+#define FLAT_TEXT_BTN_STYLE(style_name, text_style_normal, text_style_press, text_style_dim, vg_effect_start_koeff, vg_effect_end_koeff) \
+       group { name: "elm/button/base/email.flat.text."style_name; \
+               data.item: "vector_ux" "no_bg"; \
+               data.item: "corner_radius" FLAT_SQUARE_BTN_CORNER_RADIUS; \
+               script { \
+                       public mouse_down = 0; \
+                       public multi_down = 0; \
+                       public disabled = 0; \
+                       public animate = 0; \
+               } \
+               parts { \
+                       part { name: "button_bg"; \
+                               type: SPACER; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                               description { state: "default" 0.0;} \
+                       } \
+                       part { name: "effect_spacer"; \
+                               type: SPACER; \
+                               scale: 1; \
+                               description { state: "default" 0.0; \
+                                       rel1.to: "elm.text"; \
+                                       rel2.to: "elm.text"; \
+                                       rel1.relative: 0.0 0.0; \
+                                       rel2.relative: 1.0 1.0; \
+                               } \
+                       } \
+                       part { name: "tizen_vg_shape"; \
+                               type: SWALLOW; \
+                               clip_to: "tizen_vg_shape_clipper"; \
+                               scale: 1; \
+                               description { state: "default" 0.0; \
+                                       fixed: 1 1; \
+                                       rel1.to: "effect_spacer"; \
+                                       rel2.to: "effect_spacer"; \
+                                       rel1.relative: 0.5 0.5; \
+                                       rel2.relative: 0.5 0.5; \
+                               } \
+                               description { state: "ready" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       fixed: 1 1; \
+                                       rel1.relative: ((1.0 - vg_effect_start_koeff) / 2.0) ((1.0 - vg_effect_start_koeff) / 2.0); \
+                                       rel2.relative: (1.0 + (vg_effect_start_koeff - 1.0) / 2.0) (1.0 + (vg_effect_start_koeff - 1.0) / 2.0); \
+                               } \
+                               description { state: "pressed" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       fixed: 1 1; \
+                                       rel1.relative: ((1.0 - vg_effect_end_koeff) / 2.0) ((1.0 - vg_effect_end_koeff) / 2.0); \
+                                       rel2.relative: (1.0 + (vg_effect_end_koeff - 1.0) / 2.0) (1.0 + (vg_effect_end_koeff - 1.0) / 2.0); \
+                               } \
+                       } \
+                       part { name: "tizen_vg_shape_clipper"; \
+                               type: RECT; \
+                               description { state: "default" 0.0; \
+                                       color: 0 0 0 0; \
+                                       visible: 0; \
+                                       fixed: 1 1; \
+                                       rel1.to: "tizen_vg_shape"; \
+                                       rel2.to: "tizen_vg_shape"; \
+                               } \
+                               description { state: "ready" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       color: BTN_EFFECT_READY_COLOR; \
+                                       visible: 1; \
+                               } \
+                               description { state: "pressed" 0.0; \
+                                       color: BTN_EFFECT_PRESS_COLOR; \
+                                       rel1.to: "tizen_vg_shape"; \
+                                       rel2.to: "tizen_vg_shape"; \
+                               } \
+                               description { state: "disabled" 0.0; \
+                                       color: BTN_EFFECT_READY_COLOR; \
+                                       rel1.to: "tizen_vg_shape"; \
+                                       rel2.to: "tizen_vg_shape"; \
+                               } \
+                       } \
+                       part { name: "elm.text"; \
+                               type: TEXTBLOCK; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                               description { state: "default" 0.0; \
+                                       rel1.to: "button_bg"; \
+                                       rel2.to: "button_bg"; \
+                                       text { \
+                                               style: text_style_normal; \
+                                               min: 1 1; \
+                                               elipsis: -1; \
+                                       } \
+                               } \
+                               description { state: "pressed" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       text.style: text_style_press; \
+                               } \
+                               description { state: "disabled" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       text.style: text_style_dim; \
+                               } \
+                       } \
+                       part { name: "event"; \
+                               type: RECT; \
+                               description { state: "default" 0.0; \
+                                       rel1.to: "button_bg"; \
+                                       rel2.to: "button_bg"; \
+                                       color: 0 0 0 0; \
+                               } \
+                       } \
+               } \
+               programs { \
+                       program { name: "pressed_effect"; \
+                               action: STATE_SET "ready" 0.0; \
+                               target: "tizen_vg_shape_clipper"; \
+                               action: STATE_SET "custom" 0.0; \
+                               target: "tizen_vg_shape"; \
+                               after: "pressed_effect2"; \
+                       } \
+                       program { name: "pressed_effect2"; \
+                               action: STATE_SET "pressed" 0.0; \
+                               target: "tizen_vg_shape_clipper"; \
+                               target: "tizen_vg_shape"; \
+                               transition: GLIDE_EASE_OUT(0.15); \
+                               after: "pressed_effect3"; \
+                       } \
+                       program { name: "pressed_effect3"; \
+                               script { \
+                                       set_int(animate, 0); \
+                               } \
+                       } \
+                       program { name: "delay_unpressed_effect"; \
+                               in: 0.1 0.0; \
+                               after: "unpressed_effect"; \
+                       } \
+                       program { name: "unpressed_effect"; \
+                               script { \
+                                       if (get_int(disabled) == 0) { \
+                                               run_program(PROGRAM:"unpressed_effect2"); \
+                                               run_program(PROGRAM:"unpressed_effect3"); \
+                                       } else { \
+                                               run_program(PROGRAM:"disabled_effect"); \
+                                               run_program(PROGRAM:"disabled_effect2"); \
+                                       } \
+                               } \
+                       } \
+                       program { name: "unpressed_effect2"; \
+                               action: STATE_SET "default" 0.0; \
+                               target: "elm.text"; \
+                       } \
+                       program { name: "unpressed_effect3"; \
+                               action: STATE_SET "ready" 0.0; \
+                               target: "tizen_vg_shape_clipper"; \
+                               transition: GLIDE_EASE_OUT(0.45); \
+                               after: "finished_animation"; \
+                       } \
+                       program { name: "disabled_effect"; \
+                               action: STATE_SET "disabled" 0.0; \
+                               target: "elm.text"; \
+                       } \
+                       program { name: "disabled_effect2"; \
+                               action: STATE_SET "ready" 0.0; \
+                               target: "tizen_vg_shape_clipper"; \
+                               transition: GLIDE_EASE_OUT(0.45); \
+                               after: "finished_animation"; \
+                       } \
+                       program { name: "finished_animation"; \
+                               action: STATE_SET "default" 0.0; \
+                               target: "tizen_vg_shape"; \
+                               target: "tizen_vg_shape_clipper"; \
+                       } \
+                       program { name: "pressed"; \
+                               signal: "mouse,down,1*"; \
+                               source: "event"; \
+                               script { \
+                                       if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { \
+                                               stop_program(PROGRAM:"delay_unpressed_effect"); \
+                                               set_int(mouse_down, 1); \
+                                               set_int(animate, 1); \
+                                               emit("elm,action,press", ""); \
+                                               run_program(PROGRAM:"pressed_effect"); \
+                                       } \
+                               } \
+                       } \
+                       program { name: "unpressed"; \
+                               signal: "mouse,up,1"; \
+                               source: "event"; \
+                               script { \
+                                       if (get_int(mouse_down) == 1) { \
+                                               set_int(mouse_down, 0); \
+                                               if (get_int(disabled) == 0) { \
+                                                       if (get_int(animate) == 0) { \
+                                                               run_program(PROGRAM:"unpressed_effect"); \
+                                                       } else { \
+                                                               set_state(PART:"tizen_vg_shape", "pressed", 0.0); \
+                                                               set_state(PART:"tizen_vg_shape_clipper", "pressed", 0.0); \
+                                                               set_state(PART:"elm.text", "pressed", 0.0); \
+                                                               set_int(animate, 0); \
+                                                               run_program(PROGRAM:"delay_unpressed_effect"); \
+                                                       } \
+                                                       emit("elm,action,unpress", ""); \
+                                               } \
+                                       } \
+                               } \
+                       } \
+                       program { name: "button_click"; \
+                               signal: "mouse,clicked,1"; \
+                               source: "event"; \
+                               script { \
+                                       if (get_int(multi_down) == 0) { \
+                                               if (get_int(disabled) == 0) { \
+                                                       run_program(PROGRAM:"play_sound"); \
+                                                       run_program(PROGRAM:"clicked_signal"); \
+                                               } \
+                                       } \
+                               } \
+                       } \
+                       program { name: "play_sound"; \
+                               action: RUN_PLUGIN "touch_sound"; \
+                       } \
+                       program { name: "clicked_signal"; \
+                               in: 0.001 0.0; \
+                               action: SIGNAL_EMIT "elm,action,click" ""; \
+                       } \
+                       program { name: "enable"; \
+                               signal: "elm,state,enabled"; \
+                               source: "elm"; \
+                               script { \
+                                       set_int(disabled, 0); \
+                                       set_state(PART:"elm.text", "default", 0.0); \
+                               } \
+                       } \
+                       program { name: "disable"; \
+                               signal: "elm,state,disabled"; \
+                               source: "elm"; \
+                               script { \
+                                       set_int(disabled, 1); \
+                                       if (get_int(animate) == 1) return; \
+                                               set_state(PART:"elm.text", "disabled", 0.0); \
+                               } \
+                       } \
+                       program { \
+                               name: "multi_down"; \
+                               signal: "elm,action,multi,down"; \
+                               source: "elm"; \
+                               script { \
+                                       set_int(multi_down, 1); \
+                               } \
+                       } \
+                       program { \
+                               name: "multi_up"; \
+                               signal: "elm,action,multi,up"; \
+                               source: "elm"; \
+                               script { \
+                                       set_int(multi_down, 0); \
+                               } \
+                       } \
+                       program { name: "pass_event_enable"; \
+                               signal: "elm,event,pass,enabled"; \
+                               source: "elm"; \
+                               script { \
+                                       set_mouse_events(PART:"event", 0); \
+                               } \
+                       } \
+                       program { name: "pass_event_disable"; \
+                               signal: "elm,event,pass,disabled"; \
+                               source:"elm"; \
+                               script { \
+                                       set_mouse_events(PART:"event", 1); \
+                               } \
+                       } \
+                       program { name: "repeat_event_enable"; \
+                               signal: "elm,event,repeat,enabled"; \
+                               source: "elm"; \
+                               script { \
+                                       set_repeat_events(PART:"event", 1); \
+                               } \
+                       } \
+                       program { name: "repeat_event_disable"; \
+                               signal: "elm,event,repeat,disabled"; \
+                               source:"elm"; \
+                               script { \
+                                       set_repeat_events(PART:"event", 0); \
+                               } \
+                       } \
+                       program { \
+                               signal: "elm,action,press"; \
+                               source: ""; \
+                               action: STATE_SET "pressed" 0.0; \
+                               target: "elm.text"; \
+                       } \
+               } \
+       }
+
+#define FLAT_CIRCLE_BTN_VI_OUTER_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
+       FLAT_CIRCLE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, 1.0, 1.3)
+
+#define FLAT_CIRCLE_BTN_VI_INNER_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
+       FLAT_CIRCLE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, 0.7, 1.0)
+
+#define FLAT_SQUARE_BTN_VI_OUTER_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
+       FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, 1.0, 1.3,)
+
+#define FLAT_SQUARE_BTN_VI_INNER_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
+       FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, 0.7, 1.0,)
+
+#define FLAT_SQUARE_BTN_VI_OUTER_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, part_ext) \
+       FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, 1.0, 1.3, part_ext)
+
+#define FLAT_SQUARE_BTN_VI_INNER_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, part_ext) \
+       FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, 0.7, 1.0, part_ext)
+
+#define FLAT_TEXT_BTN_VI_OUTER_STYLE(style_name, text_style_normal, text_style_press, text_style_dim) \
+       FLAT_TEXT_BTN_STYLE(style_name, text_style_normal, text_style_press, text_style_dim, 1.0, 1.3)
+
+#define FLAT_TEXT_BTN_VI_INNER_STYLE(style_name, text_style_normal, text_style_press, text_style_dim) \
+       FLAT_TEXT_BTN_STYLE(style_name, text_style_normal, text_style_press, text_style_dim, 0.7, 1.0)
\ No newline at end of file
index eaf6d6b..604c8aa 100644 (file)
@@ -176,5 +176,5 @@ group {
        }
 }
 
-FLAT_CIRCLE_BTN_STYLE("contact", "composer_icon/email_icon_contact.png", \
+FLAT_CIRCLE_BTN_VI_OUTER_STYLE("contact", "composer_icon/email_icon_contact.png", \
        AO006, AO006P, AO006D, EC_CONTACT_BTN_SIZE, EC_CONTACT_BTN_SIZE)
index 516f54c..77af100 100644 (file)
@@ -109,12 +109,12 @@ group { name: "ec/rt/layout/base";
                } \
        } \
 
-FLAT_SQUARE_BTN_STYLE("insert_image", EC_IMAGE_TOOLBAR_INSERT_IMAGE, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
-FLAT_SQUARE_BTN_STYLE("fontsize", EC_IMAGE_TOOLBAR_FONTSIZE, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
-FLAT_SQUARE_BTN_STYLE("bold", EC_IMAGE_TOOLBAR_BOLD, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
-FLAT_SQUARE_BTN_STYLE("italic", EC_IMAGE_TOOLBAR_ITALIC, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
-FLAT_SQUARE_BTN_STYLE("underline", EC_IMAGE_TOOLBAR_UNDERLINE, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
-FLAT_SQUARE_BTN_CUSTOM_STYLE("fontcolor", EC_IMAGE_TOOLBAR_FONTCOLOR, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
-FLAT_SQUARE_BTN_CUSTOM_STYLE("fontbgcolor", EC_IMAGE_TOOLBAR_FONTBGCOLOR, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
-FLAT_SQUARE_BTN_STYLE("ordered_list", EC_IMAGE_TOOLBAR_NUMBERING, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
-FLAT_SQUARE_BTN_STYLE("unordered_list", EC_IMAGE_TOOLBAR_ALEADSYMBOL, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
\ No newline at end of file
+FLAT_SQUARE_BTN_VI_OUTER_STYLE("insert_image", EC_IMAGE_TOOLBAR_INSERT_IMAGE, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_VI_OUTER_STYLE("fontsize", EC_IMAGE_TOOLBAR_FONTSIZE, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_VI_OUTER_STYLE("bold", EC_IMAGE_TOOLBAR_BOLD, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_VI_OUTER_STYLE("italic", EC_IMAGE_TOOLBAR_ITALIC, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_VI_OUTER_STYLE("underline", EC_IMAGE_TOOLBAR_UNDERLINE, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_VI_OUTER_CUSTOM_STYLE("fontcolor", EC_IMAGE_TOOLBAR_FONTCOLOR, AO007, AO007S, AO007D, 48, 48, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
+FLAT_SQUARE_BTN_VI_OUTER_CUSTOM_STYLE("fontbgcolor", EC_IMAGE_TOOLBAR_FONTBGCOLOR, AO007, AO007S, AO007D, 48, 48, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
+FLAT_SQUARE_BTN_VI_OUTER_STYLE("ordered_list", EC_IMAGE_TOOLBAR_NUMBERING, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_VI_OUTER_STYLE("unordered_list", EC_IMAGE_TOOLBAR_ALEADSYMBOL, AO007, AO007S, AO007D, 48, 48);
\ No newline at end of file
index 7dadb1d..8b3b5cc 100644 (file)
@@ -65,5 +65,5 @@ group {
        }
 }
 
-FLAT_CIRCLE_BTN_STYLE("add_attachment", "composer_icon/email_icon_attachment_02.png", \
+FLAT_CIRCLE_BTN_VI_OUTER_STYLE("add_attachment", "composer_icon/email_icon_attachment_02.png", \
        AO006, AO006P, AO006D,  EC_SUBJECT_ADD_ATTACHMENT_BTN_SIZE, EC_SUBJECT_ADD_ATTACHMENT_BTN_SIZE)
\ No newline at end of file
index 3d20acb..67164b1 100644 (file)
@@ -116,5 +116,5 @@ group {
        }
 }
 
-FLAT_CIRCLE_BTN_STYLE("contact", "composer_icon/email_icon_contact.png", \
+FLAT_CIRCLE_BTN_VI_OUTER_STYLE("contact", "composer_icon/email_icon_contact.png", \
        AO006, AO006P, AO006D, CONTACT_BUTTON_SIZE, CONTACT_BUTTON_SIZE)
\ No newline at end of file
index a90d86b..633db90 100644 (file)
                }
        }
 
-FLAT_SQUARE_BTN_STYLE("mbox.favourite_on", "list_icon/index_icon_favorite_on.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
-FLAT_SQUARE_BTN_STYLE("mbox.favourite_off", "list_icon/index_icon_favorite_off.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
+FLAT_SQUARE_BTN_VI_INNER_STYLE("mbox.favourite_on", "list_icon/index_icon_favorite_on.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80);
+FLAT_SQUARE_BTN_VI_INNER_STYLE("mbox.favourite_off", "list_icon/index_icon_favorite_off.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80);
index 28335f7..c90910b 100644 (file)
@@ -235,11 +235,11 @@ group {
        }
 }
 
-FLAT_CIRCLE_BTN_STYLE("cancel", "viewer_icon/email_icon_cancel.png", \
+FLAT_CIRCLE_BTN_VI_OUTER_STYLE("cancel", "viewer_icon/email_icon_cancel.png", \
        AO006, AO006P, AO006D, \
        ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE, ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE)
 
-FLAT_CIRCLE_BTN_STYLE("download", "viewer_icon/email_icon_download.png", \
+FLAT_CIRCLE_BTN_VI_OUTER_STYLE("download", "viewer_icon/email_icon_download.png", \
        AO006, AO006P, AO006D, \
        ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE, ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE)
 
index 87fd5f8..a110e0e 100644 (file)
 #define DETAILS_LAYOUT_BTN_MIN_HEIGHT 50
 
 //body button
-#define DOWNLOAD_BUTTON_MIN_HEIGHT     96
-#define DOWNLOAD_BUTTON_TEXT_SIZE      32
-#define DOWNLOAD_BUTTON_TEXTBLOCK_HEIGHT_MIN 44
-#define DOWNLOAD_BUTTON_TEXTBLOCK_PADDING_BOTTOM_HEIGHT 32
-#define TRANSPARENT_COLOR_VALUE 0 0 0 0
+#define DOWNLOAD_BUTTON_TEXT_SIZE                      32
+#define DOWNLOAD_BUTTON_PADDING_TOP                    20
+#define DOWNLOAD_BUTTON_PADDING_BOTTOM         32
+#define DOWNLOAD_BUTTON_PADDING_LEFT           32
+#define DOWNLOAD_BUTTON_PADDING_RIGHT          32
 
 //attachment layout
 #define ATTACHMENT_TOP_PADDING                         22
@@ -356,6 +356,33 @@ group {
        }
 }
 
+group {
+       name: "ev/body_button_ly/base";
+       parts {
+               E_PART_BG (LIST_BG_COLOR)
+               E_PART_PADDING_LEFT(DOWNLOAD_BUTTON_PADDING_LEFT)
+               E_PART_PADDING_RIGHT(DOWNLOAD_BUTTON_PADDING_RIGHT)
+               E_PART_PADDING_TOP(DOWNLOAD_BUTTON_PADDING_TOP)
+               E_PART_PADDING_BOTTOM(DOWNLOAD_BUTTON_PADDING_BOTTOM)
+
+               E_PART_SWALLOW("swallow.body_btn",
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       relative: 1.0 1.0;
+                                       to_x: "padding.left";
+                                       to_y: "padding.top";
+                               }
+                               rel2 {
+                                       relative: 0.0 0.0;
+                                       to_x: "padding.right";
+                                       to_y: "padding.bottom";
+                               }
+                       }
+               )
+       }
+}
+
 #define BODY_BUTTON_STYLE(_name, _color) \
        style { \
                name: _name; \
@@ -364,132 +391,12 @@ group {
                tag:  "tab" "\t"; \
        }
 
-group { name: "elm/button/base/body_button";
        styles {
                BODY_BUTTON_STYLE("body_button_style_default", ATO015_HEX);
                BODY_BUTTON_STYLE("body_button_style_press", ATO015P_HEX);
                BODY_BUTTON_STYLE("body_button_style_dim", ATO015D_HEX);
        }
-       parts {
-               part { name : "bg";
-                       type : RECT;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               min: 0 DOWNLOAD_BUTTON_MIN_HEIGHT;
-                               color: COLOR_WHITE;
-                       }
-               }
-               E_PART_PADDING_BOTTOM(DOWNLOAD_BUTTON_TEXTBLOCK_PADDING_BOTTOM_HEIGHT);
-               part { name: "elm.text";
-                       type: TEXTBLOCK;
-                       scale: 1;
-                       description { state: "default" 0.0;
-                               min: 0 DOWNLOAD_BUTTON_TEXTBLOCK_HEIGHT_MIN;
-                               text {
-                                       style: "body_button_style_default";
-                                       max: 1 0;
-                               }
-                       }
-                       description { state: "clicked" 0.0;
-                               inherit: "default" 0.0;
-                               text {
-                                       style: "body_button_style_press";
-                                       max: 1 0;
-                               }
-                       }
-                       description { state: "disabled" 0.0;
-                               inherit: "default" 0.0;
-                               text {
-                                       style: "body_button_style_dim";
-                                       max: 1 0;
-                               }
-                       }
-               }
-               part { name: "over1";
-                       type: RECT;
-                       scale: 1;
-                       ignore_flags: ON_HOLD;
-                       description { state: "default" 0.0;
-                               color: TRANSPARENT_COLOR_VALUE;
-                       }
-               }
-               part { name: "over2";
-                       type: RECT;
-                       scale: 1;
-                       repeat_events: 1;
-                       description { state: "default" 0.0;
-                               color: TRANSPARENT_COLOR_VALUE;
-                       }
-               }
-               part { name: "disabler";
-                       type: RECT;
-                       scale: 1;
-                       description { state: "default" 0.0;
-                               color: TRANSPARENT_COLOR_VALUE;
-                               visible: 0;
-                       }
-                       description { state: "disabled" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 1;
-                       }
-               }
-       }
-       programs {
-               program { name: "pressed";
-                       signal: "mouse,down,1";
-                       source: "over1";
-                       action: SIGNAL_EMIT "elm,action,press" "";
-                       after: "button_press";
-               }
-               program { name: "button_press";
-                       action: STATE_SET "clicked" 0.0;
-                       target: "elm.text";
-               }
-               program { name: "clicked";
-                       signal: "mouse,clicked,1";
-                       source: "over1";
-                       action: SIGNAL_EMIT "elm,action,click" "";
-                       after: "button_unpress";
-                       after: "touch_sound";
-               }
-               program { name: "touch_sound";
-                       action: RUN_PLUGIN "touch_sound";
-               }
-               program { name: "unpressed";
-                       signal: "mouse,up,1";
-                       source: "over2";
-                       action: SIGNAL_EMIT "elm,action,unpress" "";
-                       after: "button_unpress";
-               }
-               program { name: "button_unpress";
-                       action: STATE_SET "default" 0.0;
-                       target: "elm.text";
-               }
-               program { name: "button_disable_set";
-                       action: STATE_SET "disabled" 0.0;
-                       target: "elm.text";
-               }
-               program { name: "button_enable_set";
-                       action: STATE_SET "default" 0.0;
-                       target: "elm.text";
-               }
-               program {
-                       signal: "button_disable";
-                       source: "";
-                       action: STATE_SET "disabled" 0.0;
-                       target: "disabler";
-                       after : "button_disable_set";
-               }
-               program {
-                       signal: "button_enable";
-                       source: "";
-                       action: STATE_SET "default" 0.0;
-                       target: "disabler";
-                       after : "button_enable_set";
-               }
-       }
-}
 
-FLAT_SQUARE_BTN_STYLE("ev.favourite_on", "viewer_icon/email_icon_favorite_on.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
-FLAT_SQUARE_BTN_STYLE("ev.favourite_off", "viewer_icon/email_icon_favorite_off.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
\ No newline at end of file
+FLAT_TEXT_BTN_VI_OUTER_STYLE("body_button", "body_button_style_default", "body_button_style_press", "body_button_style_dim");
+FLAT_SQUARE_BTN_VI_INNER_STYLE("ev.favourite_on", "viewer_icon/email_icon_favorite_on.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80);
+FLAT_SQUARE_BTN_VI_INNER_STYLE("ev.favourite_off", "viewer_icon/email_icon_favorite_off.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80);
index 0fee86f..31363e6 100644 (file)
@@ -246,7 +246,7 @@ struct _view_data {
        Evas_Object *notify;
        Evas_Object *pb_notify;
        Evas_Object *pb_notify_lb;
-       Evas_Object *dn_btn;
+       Evas_Object *body_btn_ly;
 
        /* more context popup */
        Elm_Object_Item *cancel_sending_ctx_item;
index 7aecfa1..fa072d8 100644 (file)
@@ -1268,25 +1268,26 @@ void viewer_create_body_button(EmailViewerView *view, const char *button_title,
        retm_if(!button_title, "Button text is button");
        viewer_delete_body_button(view);
 
-       view->dn_btn = elm_button_add(view->base.content);
-       elm_object_style_set(view->dn_btn, "body_button");
-       evas_object_size_hint_align_set(view->dn_btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       evas_object_size_hint_weight_set(view->dn_btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_domain_translatable_text_set(view->dn_btn, PACKAGE, button_title);
-       evas_object_show(view->dn_btn);
-
-       if (view->dn_btn) {
-               elm_box_pack_end(view->main_bx, view->dn_btn);
-       }
-
-       evas_object_smart_callback_add(view->dn_btn, "clicked", cb, (void *)view);
+       view->body_btn_ly = viewer_load_edj(view->base.content, email_get_viewer_theme_path(), "ev/body_button_ly/base", EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       Evas_Object *btn = elm_button_add(view->body_btn_ly);
+       elm_object_style_set(btn, "email.flat.text.body_button");
+       evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_domain_translatable_text_set(btn, PACKAGE, button_title);
+       evas_object_smart_callback_add(btn, "clicked", cb, (void *)view);
+
+       evas_object_show(btn);
+       elm_object_part_content_set(view->body_btn_ly, "swallow.body_btn", btn);
+       evas_object_show(view->body_btn_ly);
+       elm_box_pack_end(view->main_bx, view->body_btn_ly);
 }
 
 void viewer_delete_body_button(EmailViewerView *view)
 {
        debug_enter();
-       elm_box_unpack(view->main_bx, view->dn_btn);
-       DELETE_EVAS_OBJECT(view->dn_btn);
+       elm_box_unpack(view->main_bx, view->body_btn_ly);
+       DELETE_EVAS_OBJECT(view->body_btn_ly);
 }
 
 /* EOF */
index fe5ea9d..4970597 100644 (file)
@@ -903,7 +903,7 @@ Eina_Bool viewer_initialize_data(EmailViewerView *view)
        view->notify = NULL;
        view->pb_notify = NULL;
        view->pb_notify_lb = NULL;
-       view->dn_btn = NULL;
+       view->body_btn_ly = NULL;
        view->to_mbe = NULL;
        view->to_ly = NULL;
        view->cc_mbe = NULL;
@@ -1083,7 +1083,7 @@ void viewer_delete_evas_objects(EmailViewerView *view, Eina_Bool isHide)
                DELETE_EVAS_OBJECT(view->details_button);
                DELETE_EVAS_OBJECT(view->favourite_btn);
                DELETE_EVAS_OBJECT(view->attachment_ly);
-               DELETE_EVAS_OBJECT(view->dn_btn);
+               DELETE_EVAS_OBJECT(view->body_btn_ly);
                DELETE_EVAS_OBJECT(view->webview_button);
                DELETE_EVAS_OBJECT(view->list_progressbar);
        }