TizenRefApp-6958 [Email] Add square VG effect custom button style to Richtext Toolbar 21/84421/2
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Thu, 18 Aug 2016 11:41:39 +0000 (14:41 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Thu, 18 Aug 2016 13:52:10 +0000 (16:52 +0300)
Change-Id: I6a08fe6e0938fa029897e07dd1029d9ffd816bcf

18 files changed:
CMake/email-common/CMakeLists.txt
CMake/modules/email-composer-module/CMakeLists.txt
CMake/modules/email-filter-module/CMakeLists.txt
CMake/modules/email-viewer-module/CMakeLists.txt
edc/common/email-flat-buttons.edc [moved from edc/common/email-round-icon-button-style.edc with 52% similarity]
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/viewer/email-viewer-base-layout.edc
modules/composer/src/email-composer-recipient.c
modules/composer/src/email-composer-rich-text-toolbar.c
modules/composer/src/email-composer-subject.c
modules/filter/src/email-filter-edit-view.c
modules/viewer/src/email-viewer-attachment.c
res/edje/email-composer-view.edc
res/edje/email-filter.edc
res/edje/email-viewer.edc

index b0df207..5abd4e9 100644 (file)
@@ -40,7 +40,7 @@ ADD_CUSTOM_COMMAND(
                DEPENDS ${PROJECT_EDJE_DIR}/email-common-theme.edc
                                ${PROJECT_EDC_DIR}/common/email-title-search.edc
                                ${PROJECT_EDC_DIR}/common/email-two-bottom-btn-toolbar-theme.edc
-                               ${PROJECT_EDC_DIR}/common/email-round-icon-button-style.edc
+                               ${PROJECT_EDC_DIR}/common/email-flat-icon-buttons.edc
                                ${PROJECT_EDC_DIR}/common/email-colors.edc
                                ${PROJECT_COMMON_INCLUDE}/email-images.h
 )
index 03ecdcf..ce07be1 100644 (file)
@@ -40,6 +40,9 @@ ADD_CUSTOM_COMMAND(
                COMMAND edje_cc -no-save -id ${PROJECT_EDC_IMAGES_DIR} ${EDJE_CC_DEFINITIONS}
                ${PROJECT_EDJE_DIR}/email-composer-view.edc ${CMAKE_CURRENT_BINARY_DIR}/email-composer-view.edj
                DEPENDS ${PROJECT_EDJE_DIR}/email-composer-view.edc
+                               ${PROJECT_EDC_DIR}/common/email-colors.edc
+                               ${PROJECT_EDC_DIR}/common/email-parts.edc
+                               ${PROJECT_EDC_DIR}/common/email-flat-buttons.edc
                                ${PROJECT_EDC_DIR}/composer/email-composer-edc-common.edc
                                ${PROJECT_EDC_DIR}/composer/email-composer-layouts.edc
                                ${PROJECT_EDC_DIR}/composer/email-composer-attachment.edc
@@ -48,8 +51,6 @@ ADD_CUSTOM_COMMAND(
                                ${PROJECT_EDC_DIR}/composer/email-composer-recipients.edc
                                ${PROJECT_EDC_DIR}/composer/email-composer-scroller.edc
                                ${PROJECT_EDC_DIR}/composer/email-composer-subject.edc
-                               ${PROJECT_EDC_DIR}/common/email-colors.edc
-                               ${PROJECT_EDC_DIR}/common/email-parts.edc
                                ${PROJECT_EDC_DIR}/composer/email-composer-rich-text.edc
                                ${PROJECT_EDC_DIR}/composer/email-composer-edc-define.h
                                ${PROJECT_EDC_DIR}/composer/email-composer-toolbar-buttons_defines.edc
index 703a27b..d9a7ab6 100644 (file)
@@ -26,6 +26,7 @@ ADD_CUSTOM_COMMAND(
        ${PROJECT_EDJE_DIR}/email-filter.edc ${CMAKE_CURRENT_BINARY_DIR}/email-filter.edj
        DEPENDS ${PROJECT_EDJE_DIR}/email-filter.edc
                        ${PROJECT_EDC_DIR}/filter/email-filter-address-edit-view.edc)
+                       ${PROJECT_EDC_DIR}/common/email-flat-buttons.edc
 
 ADD_CUSTOM_TARGET(email-filter.edj ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/email-filter.edj)
 
index abe2497..2b5dae7 100644 (file)
@@ -43,7 +43,7 @@ ADD_CUSTOM_COMMAND(
                                ${PROJECT_EDC_DIR}/common/email-colors.edc
                                ${PROJECT_EDC_DIR}/common/email-parts.edc
                                ${PROJECT_EDC_DIR}/common/email-two-bottom-btn-toolbar-theme.edc
-                               ${PROJECT_EDC_DIR}/common/email-round-icon-button-style.edc
+                               ${PROJECT_EDC_DIR}/common/email-flat-buttons.edc
 )
 ADD_CUSTOM_TARGET(email-viewer.edj ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/email-viewer.edj)
 
similarity index 52%
rename from edc/common/email-round-icon-button-style.edc
rename to edc/common/email-flat-buttons.edc
index a9f33ee..ff0e2d7 100644 (file)
  */
 
 plugins {
-               plugin {
-                       name: "touch_sound"; // Name run by RUN_PLUGIN
-                       source: "feedback"; // External edje plugin name
-                       param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP";
-               }
+       plugin {
+               name: "touch_sound"; // Name run by RUN_PLUGIN
+               source: "feedback"; // External edje plugin name
+               param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP";
        }
+}
 
 #define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
+#define FLAT_SQUARE_BTN_CORNER_RADIUS "10"
+#define FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF 1.3
 
 /**
  * @brief Macros to generate styles for button with icon inside with support of click VI effect and sound.
- *
  */
-#define ROUND_ICON_BUTTON_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
-       group { name: "elm/button/base/"style_name; \
+#define FLAT_CIRCLE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
+       group { name: "elm/button/base/email.flat.circle."style_name; \
                data.item: "vector_ux" "no_bg/circle"; \
                images { \
                        image: image_normal COMP; \
@@ -321,4 +322,276 @@ plugins {
                                } \
                        } \
                } \
-       }
\ No newline at end of file
+       }
+
+#define FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, part_ext) \
+       group { name: "elm/button/base/email.flat.square."style_name; \
+               data.item: "vector_ux" "no_bg"; \
+               data.item: "corner_radius" FLAT_SQUARE_BTN_CORNER_RADIUS; \
+               images { \
+                       image: image_normal COMP; \
+               } \
+               script { \
+                       public mouse_down = 0; \
+                       public multi_down = 0; \
+                       public animate = 0; \
+                       public disabled = 0; \
+               } \
+               parts { \
+                       part { name: "button_bg"; \
+                               type: SPACER; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                                       description { state: "default" 0.0; \
+                                       min: min_width min_height; \
+                                       max: min_width min_height; \
+                                       fixed: 1 1; \
+                               } \
+                       } \
+                       part { name: "effect_spacer"; \
+                               type: SPACER; \
+                               scale: 1; \
+                               description { state: "default" 0.0; \
+                                       fixed: 1 1; \
+                                       rel1.relative: 0.5 0.5; \
+                                       rel2.relative: 0.5 0.5; \
+                                       min: (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_width) (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_height); \
+                                       max: (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_width) (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_height); \
+                               } \
+                       } \
+                       part { name: "tizen_vg_shape"; \
+                               type: SWALLOW; \
+                               clip_to: "tizen_vg_shape_clipper"; \
+                               scale: 1; \
+                               description { state: "default" 0.0; \
+                                       fixed: 1 1; \
+                                       rel1.relative: 0.5 0.5; \
+                                       rel2.relative: 0.5 0.5; \
+                               } \
+                               description { state: "ready" 0.0; \
+                                       fixed: 1 1; \
+                                       rel1.to: "effect_spacer"; \
+                                       rel2.to: "effect_spacer"; \
+                               } \
+                               description { state: "pressed" 0.0; \
+                                       inherit: "ready" 0.0; \
+                                       rel1.relative: -0.15 -0.15; \
+                                       rel2.relative: 1.15 1.15; \
+                               } \
+                       } \
+                       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: 61 185 204 0; \
+                                       visible: 1; \
+                               } \
+                               description { state: "pressed" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       color: 61 185 204 77; \
+                                       visible: 1; \
+                               } \
+                       } \
+                       part { name: "button_icon"; \
+                               type: IMAGE; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                               description { state: "default" 0.0; \
+                                       rel1.to: "button_bg"; \
+                                       rel2.to: "button_bg"; \
+                                       fixed: 1 1; \
+                                       image.normal: image_normal; \
+                                       color: color_normal; \
+                               } \
+                               description { state: "pressed" 0.0; \
+                                               inherit: "default" 0.0; \
+                                               color: color_press; \
+                               } \
+                               description { state: "disabled" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       color: color_dim; \
+                               } \
+                       } \
+                       part { name: "event"; \
+                               type: RECT; \
+                               description { state: "default" 0.0; \
+                                       rel1.to: "button_bg"; \
+                                       rel2.to: "button_bg"; \
+                                       color: 0 0 0 0; \
+                               } \
+                       } \
+                       part_ext \
+               } \
+               programs { \
+                       program { name: "pressed_effect"; \
+                               action: STATE_SET "ready" 0.0; \
+                               target: "tizen_vg_shape_clipper"; \
+                               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 { \
+                                       run_program(PROGRAM:"unpressed_effect2"); \
+                               } \
+                       } \
+                       program { name: "unpressed_effect2"; \
+                               action: STATE_SET "ready" 0.0; \
+                               target: "tizen_vg_shape_clipper"; \
+                               transition: GLIDE_EASE_OUT(0.45); \
+                               after: "unpressed_effect3"; \
+                       } \
+                       program { name: "unpressed_effect3"; \
+                               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_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) && (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:"button_icon", "default", 0.0); \
+                               } \
+                       } \
+                       program { name: "disable"; \
+                               signal: "elm,state,disabled"; \
+                               source: "elm"; \
+                               script { \
+                                       set_int(disabled, 1); \
+                                       set_state(PART:"button_icon", "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: "button_press"; \
+                               source: ""; \
+                               action: STATE_SET "pressed" 0.0; \
+                               target: "button_icon"; \
+                       } \
+                       program { name: "button_unpress"; \
+                               signal: "button_unpress"; \
+                               source: ""; \
+                               action: STATE_SET "default" 0.0; \
+                               target: "button_icon"; \
+                       } \
+               } \
+       }
+
+#define FLAT_SQUARE_BTN_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, )
index e7ea716..eaf6d6b 100644 (file)
@@ -176,5 +176,5 @@ group {
        }
 }
 
-ROUND_ICON_BUTTON_STYLE("contact_button_style", "composer_icon/email_icon_contact.png", \
+FLAT_CIRCLE_BTN_STYLE("contact", "composer_icon/email_icon_contact.png", \
        AO006, AO006P, AO006D, EC_CONTACT_BTN_SIZE, EC_CONTACT_BTN_SIZE)
index c1f8412..b1ffa04 100644 (file)
  *
  */
 
-#define RICHTEXT_TOOLBAR_HEIGHT 96
+#define RTTB_HEIGHT 96
+#define RTTB_BTN_COLOR_BAR_SIZE_MIN 50 10
+#define RTTB_BTN_COLOR_BAR_BOTTOM_PAD_HEIGHT 3
 
-#define RTTB_BUTTON_LAYOUT_MIN_SIZE 48 48
-
-#define COLOR_BAR_SIZE 50 10
-#define COLOR_BAR_BOTTOM_PADDING_HEIGHT 3
-
-#define TRANSPARENT_COLOR_VALUE 0 0 0 0
-
-#define BUTTON_TOOGLE_STYLES(style_name, button_image) \
-group { name: "elm/button/base/"style_name; \
-       images { \
-               image: button_image COMP; \
-       } \
-       parts { \
-               part { name : "bg"; \
-                       type : SPACER; \
-                       scale: 1; \
-                       description { \
-                               state: "default" 0.0; \
-                               min: RTTB_BUTTON_LAYOUT_MIN_SIZE; \
-                       } \
-               } \
-               part { name: "button_image"; \
-                       type: IMAGE; \
-                       scale: 1; \
-                       description { state: "default" 0.0; \
-                               aspect: 1 1; \
-                               aspect_preference: BOTH; \
-                               fixed : 1.0 1.0; \
-                               image.normal: button_image; \
-                               color :  AO007; \
-                       } \
-                       description { \
-                               state: "pressed" 0.0; \
-                               inherit: "default" 0.0; \
-                               fixed : 1.0 1.0; \
-                               color :  AO007S; \
-                       } \
-                       description { \
-                               state: "unpressed" 0.0; \
-                               inherit: "default" 0.0; \
-                               fixed : 1.0 1.0; \
-                               color :  AO007; \
-                       } \
-                       description { \
-                               state: "disabled" 0.0; \
-                               inherit: "default" 0.0; \
-                               fixed : 1.0 1.0; \
-                               color :  AO007D; \
-                       } \
-               } \
-               part { name: "over1"; \
-                       type: RECT; \
-                       scale: 1; \
-                       ignore_flags: ON_HOLD; \
-                       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 { \
-                       signal: "button_press"; \
-                       source: ""; \
-                       action: STATE_SET "pressed" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { name: "button_unpress"; \
-                       signal: "button_unpress"; \
-                       source: ""; \
-                       action: STATE_SET "unpressed" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { \
-                       signal: "mouse,down,1"; \
-                       source: "over1"; \
-                       action: SIGNAL_EMIT "elm,action,click" ""; \
-               } \
-               program { name: "button_disable_set"; \
-                       action: STATE_SET "disabled" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { name: "button_enable_set"; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { \
-                       signal: "button_disable"; \
-                       source: ""; \
-                       action: STATE_SET "disabled" 0.0; \
-                       target: "disabler"; \
-                       after : "button_unpress"; \
-                       after : "button_disable_set"; \
-               } \
-               program { \
-                       signal: "button_enable"; \
-                       source: ""; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "disabler"; \
-                       after : "button_enable_set"; \
-               } \
-       } \
-}
-
-#define BUTTON_STYLES(style_name, button_image) \
-group { name: "elm/button/base/"style_name; \
-       images { \
-               image: button_image COMP; \
-       } \
-       parts { \
-               part { name : "bg"; \
-                       type : SPACER; \
-                       scale: 1; \
-                       description { \
-                               state: "default" 0.0; \
-                               min: RTTB_BUTTON_LAYOUT_MIN_SIZE; \
-                       } \
-           } \
-               part { name: "button_image"; \
-                       type: IMAGE; \
-                       scale: 1; \
-                       description { state: "default" 0.0; \
-                               aspect: 1 1; \
-                               aspect_preference: BOTH; \
-                               fixed : 1.0 1.0; \
-                               image.normal: button_image; \
-                               color :  AO007; \
-                       } \
-                       description { \
-                               state: "clicked" 0.0; \
-                               inherit: "default" 0.0; \
-                               fixed : 1.0 1.0; \
-                               color :  AO007S; \
-                       } \
-                       description { \
-                               state: "disabled" 0.0; \
-                               inherit: "default" 0.0; \
-                               fixed : 1.0 1.0; \
-                               color :  AO007D; \
-                       } \
-               } \
-               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: "button_click"; \
-                       signal: "mouse,down,1"; \
-                       source: "over1"; \
-                       action: SIGNAL_EMIT "elm,action,press" ""; \
-                       after: "button_click_anim"; \
-               } \
-               program { name: "button_click_anim"; \
-                       action: STATE_SET "clicked" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { name: "button_unclick"; \
-                       signal: "mouse,up,1"; \
-                       source: "over2"; \
-                       action: SIGNAL_EMIT "elm,action,unpress" ""; \
-                       after: "button_unclick_anim"; \
-                       after: "button_unclick3"; \
-               } \
-               program { name: "button_unclick3"; \
-                       action: SIGNAL_EMIT "elm,action,click" ""; \
-               } \
-               program { name: "button_unclick_anim"; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { name: "button_disable_set"; \
-                       action: STATE_SET "disabled" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { name: "button_enable_set"; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { \
-                       signal: "button_disable"; \
-                       source: ""; \
-                       action: STATE_SET "disabled" 0.0; \
-                       target: "disabler"; \
-                       after : "button_unclick_anim"; \
-                       after : "button_disable_set"; \
-               } \
-               program { \
-                       signal: "button_enable"; \
-                       source: ""; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "disabler"; \
-                       after : "button_enable_set"; \
-               } \
-       } \
-}
-
-#define BUTTON_FONTCOLOR_STYLES(style_name, button_image) \
-group { name: "elm/button/base/"style_name; \
-       images { \
-               image: button_image COMP; \
-       } \
-       parts { \
-               part { name : "bg"; \
-                       type : SPACER; \
-                       scale: 1; \
-                       description { \
-                               state: "default" 0.0; \
-                               min: RTTB_BUTTON_LAYOUT_MIN_SIZE; \
-                       } \
-               } \
-               part { name: "button_image"; \
-                       type: IMAGE; \
-                       scale: 1; \
-                       description { state: "default" 0.0; \
-                               aspect: 1 1; \
-                               aspect_preference: BOTH; \
-                               fixed : 1.0 1.0; \
-                               image.normal: button_image; \
-                               color :  AO007; \
-                       } \
-                       description { \
-                               state: "clicked" 0.0; \
-                               inherit: "default" 0.0; \
-                               fixed : 1.0 1.0; \
-                               color :  AO007S; \
-                       } \
-                       description { \
-                               state: "disabled" 0.0; \
-                               inherit: "default" 0.0; \
-                               fixed : 1.0 1.0; \
-                               color :  AO007D; \
-                       } \
-               } \
-               part { name : "colored_line_bottom_padding"; \
-                       type : SPACER; \
-                       scale: 1; \
-                       description { \
-                               state: "default" 0.0; \
-                               min: 0 COLOR_BAR_BOTTOM_PADDING_HEIGHT; \
-                               fixed: 0 1; \
-                               align: 0.5 1.0; \
-                               rel1 \
-                               { \
-                                       relative: 0.0 1.0; to: "button_image"; \
-                               } \
-                               rel2 \
-                               { \
-                                       relative: 1.0 1.0; to: "button_image"; \
-                               } \
-                       } \
-            } \
-                part { name : "colored_line"; \
-                       type : SWALLOW; \
-                       scale: 1; \
-                       description { \
-                               state: "default" 0.0; \
-                               min: COLOR_BAR_SIZE; \
-                               fixed: 1 1; \
-                               align: 0.5 1.0; \
-                               rel1 \
-                               { \
-                                       relative: 0.0 0.0; to: "colored_line_bottom_padding"; \
-                               } \
-                               rel2 \
-                               { \
-                                       relative: 1.0 0.0; to: "colored_line_bottom_padding"; \
-                               } \
-                       } \
-               } \
-               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: "button_click"; \
-                       signal: "mouse,down,1"; \
-                       source: "over1"; \
-                       action: SIGNAL_EMIT "elm,action,press" ""; \
-                       after: "button_click_anim"; \
-               } \
-               program { name: "button_click_anim"; \
-                       action: STATE_SET "clicked" 0.0; \
-                       target: "button_image"; \
-               } \
-               program { name: "button_unclick"; \
-                       signal: "mouse,up,1"; \
-                       source: "over2"; \
-                       action: SIGNAL_EMIT "elm,action,unpress" ""; \
-                       after: "button_unclick_anim"; \
-                       after: "button_unclick3"; \
-                } \
-                program { name: "button_unclick3"; \
-                       action: SIGNAL_EMIT "elm,action,click" ""; \
-         } \
-                program { name: "button_unclick_anim"; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "button_image"; \
-                } \
-                program { name: "button_disable_set"; \
-                       action: STATE_SET "disabled" 0.0; \
-                       target: "button_image"; \
-                } \
-                program { name: "button_enable_set"; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "button_image"; \
-                } \
-                program { \
-                       signal: "button_disable"; \
-                       source: ""; \
-                       action: STATE_SET "disabled" 0.0; \
-                       target: "disabler"; \
-                       after : "button_unclick_anim"; \
-                       after : "button_disable_set"; \
-                } \
-                program { \
-                       signal: "button_enable"; \
-                       source: ""; \
-                       action: STATE_SET "default" 0.0; \
-                       target: "disabler"; \
-                       after : "button_enable_set"; \
-               } \
-       } \
-}
-
-group
-{
-       name: "ec/rt/layout/base";
+group { name: "ec/rt/layout/base";
        parts {
                part { name : "bg";
                        type : RECT;
                        scale: 1;
                        description { state: "default" 0.0;
-                               min: 0 RICHTEXT_TOOLBAR_HEIGHT;
+                               min: 0 RTTB_HEIGHT;
                                color: AO008;
                        }
                }
@@ -470,12 +85,36 @@ group
        }
 }
 
-BUTTON_STYLES("ec/toolbar/button/insert_image", EC_IMAGE_TOOLBAR_INSERT_IMAGE);
-BUTTON_STYLES("ec/toolbar/button/fontsize", EC_IMAGE_TOOLBAR_FONTSIZE);
-BUTTON_TOOGLE_STYLES("ec/toolbar/button/bold", EC_IMAGE_TOOLBAR_BOLD);
-BUTTON_TOOGLE_STYLES("ec/toolbar/button/italic", EC_IMAGE_TOOLBAR_ITALIC);
-BUTTON_TOOGLE_STYLES("ec/toolbar/button/underline", EC_IMAGE_TOOLBAR_UNDERLINE);
-BUTTON_FONTCOLOR_STYLES("ec/toolbar/button/fontcolor", EC_IMAGE_TOOLBAR_FONTCOLOR);
-BUTTON_FONTCOLOR_STYLES("ec/toolbar/button/fontbgcolor", EC_IMAGE_TOOLBAR_FONTBGCOLOR);
-BUTTON_TOOGLE_STYLES("ec/toolbar/button/ordered_list", EC_IMAGE_TOOLBAR_NUMBERING);
-BUTTON_TOOGLE_STYLES("ec/toolbar/button/unordered_list", EC_IMAGE_TOOLBAR_ALEADSYMBOL);
+#define FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT \
+       part { name: "colored_line.bottom.padding"; \
+               type: SPACER; \
+               scale: 1; \
+               description { state: "default" 0.0; \
+                       fixed: 0 1; \
+                       align: 0.5 1.0; \
+                       rel1 { relative: 0.0 1.0; to: "button_icon"; } \
+                       rel2 { relative: 1.0 1.0; to: "button_icon"; } \
+                       min: 0 RTTB_BTN_COLOR_BAR_BOTTOM_PAD_HEIGHT; \
+               } \
+       } \
+       part { name: "swallow.colored_line"; \
+               type: SWALLOW; \
+               scale: 1; \
+               description { state: "default" 0.0; \
+                       fixed: 1 1; \
+                       align: 0.5 1.0; \
+                       rel1 { relative: 0.0 0.0; to: "colored_line.bottom.padding"; } \
+                       rel2 { relative: 1.0 0.0; to: "colored_line.bottom.padding"; } \
+                       min: RTTB_BTN_COLOR_BAR_SIZE_MIN; \
+               } \
+       } \
+
+FLAT_SQUARE_BTN_STYLE("insert_image", EC_IMAGE_TOOLBAR_INSERT_IMAGE, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_STYLE("fontsize", EC_IMAGE_TOOLBAR_FONTSIZE, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_STYLE("bold", EC_IMAGE_TOOLBAR_BOLD, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_STYLE("italic", EC_IMAGE_TOOLBAR_ITALIC, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_STYLE("underline", EC_IMAGE_TOOLBAR_UNDERLINE, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_CUSTOM_STYLE("fontcolor", EC_IMAGE_TOOLBAR_FONTCOLOR, AO007, AO007S, AO007D, 48, 48, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
+FLAT_SQUARE_BTN_CUSTOM_STYLE("fontbgcolor", EC_IMAGE_TOOLBAR_FONTBGCOLOR, AO007, AO007S, AO007D, 48, 48, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
+FLAT_SQUARE_BTN_STYLE("ordered_list", EC_IMAGE_TOOLBAR_NUMBERING, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_STYLE("unordered_list", EC_IMAGE_TOOLBAR_ALEADSYMBOL, AO007, AO007S, AO007D, 48, 48);
index 91845b9..7dadb1d 100644 (file)
@@ -65,5 +65,5 @@ group {
        }
 }
 
-ROUND_ICON_BUTTON_STYLE("add_attachment_button_style", "composer_icon/email_icon_attachment_02.png", \
+FLAT_CIRCLE_BTN_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 e57353c..3d20acb 100644 (file)
@@ -116,5 +116,5 @@ group {
        }
 }
 
-ROUND_ICON_BUTTON_STYLE("contact_button_style", "composer_icon/email_icon_contact.png", \
+FLAT_CIRCLE_BTN_STYLE("contact", "composer_icon/email_icon_contact.png", \
        AO006, AO006P, AO006D, CONTACT_BUTTON_SIZE, CONTACT_BUTTON_SIZE)
\ No newline at end of file
index ee76e9d..28335f7 100644 (file)
@@ -235,11 +235,11 @@ group {
        }
 }
 
-ROUND_ICON_BUTTON_STYLE("cancel_button_style", "viewer_icon/email_icon_cancel.png", \
+FLAT_CIRCLE_BTN_STYLE("cancel", "viewer_icon/email_icon_cancel.png", \
        AO006, AO006P, AO006D, \
        ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE, ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE)
 
-ROUND_ICON_BUTTON_STYLE("download_button_style", "viewer_icon/email_icon_download.png", \
+FLAT_CIRCLE_BTN_STYLE("download", "viewer_icon/email_icon_download.png", \
        AO006, AO006P, AO006D, \
        ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE, ATTACHMENT_ITEM_DOWNLOAD_BTN_SIZE)
 
index 914c482..9d5be7b 100644 (file)
@@ -466,7 +466,7 @@ static Evas_Object *_recipient_create_contact_button(EmailComposerView *view, Ev
        Evas_Object *btn = elm_button_add(parent);
        /* Temporary solution. After attach panel firstly appears button style resets to default */
        elm_object_theme_set(btn, view->theme);
-       elm_object_style_set(btn, "contact_button_style");
+       elm_object_style_set(btn, "email.flat.circle.contact");
        evas_object_smart_callback_add(btn, "clicked", _recipient_contact_button_clicked_cb, view);
        evas_object_smart_callback_add(btn, "pressed", composer_circle_button_pressed_cb, parent);
        evas_object_show(btn);
index a86668a..0cbbc69 100644 (file)
@@ -26,7 +26,7 @@
 #define RICHTEXT_TOOLBAR_SIDE_PADDING_WIDTH ELM_SCALE_SIZE(32)
 
 #define RICHTEXT_TOOLBAR_DATA_NAME "toolbar_data"
-#define BUTTON_COLOR_LINE_PART_NAME "colored_line"
+#define BUTTON_COLOR_LINE_PART_NAME "swallow.colored_line"
 
 #define JS_EXEC_COMMAND_PROTOTYPE "ExecCommand('%s', '%s');"
 #define FONT_COLOR_COMMAND_NAME "fontColor"
@@ -57,15 +57,15 @@ static FonSizesType _rich_text_font_sizes[] = {
 };
 
 static char *_rich_text_button_list[RICH_TEXT_TYPE_COUNT] = {
-               "ec/toolbar/button/insert_image",
-               "ec/toolbar/button/fontsize",
-               "ec/toolbar/button/bold",
-               "ec/toolbar/button/italic",
-               "ec/toolbar/button/underline",
-               "ec/toolbar/button/fontcolor",
-               "ec/toolbar/button/fontbgcolor",
-               "ec/toolbar/button/ordered_list",
-               "ec/toolbar/button/unordered_list"
+               "email.flat.square.insert_image",
+               "email.flat.square.fontsize",
+               "email.flat.square.bold",
+               "email.flat.square.italic",
+               "email.flat.square.underline",
+               "email.flat.square.fontcolor",
+               "email.flat.square.fontbgcolor",
+               "email.flat.square.ordered_list",
+               "email.flat.square.unordered_list"
 };
 
 static email_rgba_t _default_font_colors[] = {
index 71b6917..a77fe85 100644 (file)
@@ -101,7 +101,7 @@ static Evas_Object *_subject_create_add_attachment(EmailComposerView *view, Evas
        debug_enter();
 
        Evas_Object *btn = elm_button_add(parent);
-       elm_object_style_set(btn, "add_attachment_button_style");
+       elm_object_style_set(btn, "email.flat.circle.add_attachment");
        evas_object_smart_callback_add(btn, "clicked", _subject_attach_files_clicked_cb, view);
        evas_object_smart_callback_add(btn, "pressed", composer_circle_button_pressed_cb, parent);
        evas_object_show(btn);
index 5b25a58..5a2ea05 100644 (file)
@@ -441,7 +441,7 @@ static Evas_Object *_gl_content_get_cb(void *data, Evas_Object *obj, const char
                        elm_object_part_content_set(layout, "email.filter.editfield_ly", li->editfield.layout);
 
                        Evas_Object *ct_btn = elm_button_add(layout);
-                       elm_object_style_set(ct_btn, "contact_button_style");
+                       elm_object_style_set(ct_btn, "email.flat.circle.contact");
                        evas_object_propagate_events_set(ct_btn, EINA_FALSE);
                        evas_object_smart_callback_add(ct_btn, "clicked", _contact_button_clicked_cb, view);
                        evas_object_show(ct_btn);
index 20a1003..fb1321e 100644 (file)
@@ -1071,7 +1071,7 @@ static Evas_Object *_viewer_create_gl_item_icon_file_type(Evas_Object *parent, c
 static Evas_Object *_viewer_create_gl_item_download_button(Evas_Object *parent, EV_attachment_data *attachment_data)
 {
        Evas_Object *obj = elm_button_add(parent);
-       elm_object_style_set(obj, "download_button_style");
+       elm_object_style_set(obj, "email.flat.circle.download");
        evas_object_propagate_events_set(obj, EINA_FALSE);
        evas_object_repeat_events_set(obj, EINA_FALSE);
        evas_object_smart_callback_add(obj, "clicked", _viewer_attachment_button_clicked, attachment_data);
@@ -1135,7 +1135,7 @@ static void _viewer_update_gl_attachment_item(EV_attachment_data *attachment_dat
        char size_str[EMAIL_BUFF_SIZE_HUG] = { 0 };
 
        if (attachment_data->state == EV_ATT_STATE_IDLE) {
-               elm_object_style_set(attachment_data->download_button, "download_button_style");
+               elm_object_style_set(attachment_data->download_button, "email.flat.circle.download");
                _viewer_gl_attachment_item_unpack_progress_bar_item(attachment_data);
 
                if (attachment_data->attachment_info->is_downloaded) {
@@ -1148,7 +1148,7 @@ static void _viewer_update_gl_attachment_item(EV_attachment_data *attachment_dat
                _viewer_gl_item_progress_label_update_text(attachment_data->progress_label_right, NULL);
 
        } else {
-               elm_object_style_set(attachment_data->download_button, "cancel_button_style");
+               elm_object_style_set(attachment_data->download_button, "email.flat.circle.cancel");
 
                bool pending = true;
                char percent_str[MAX_STR_LEN] = { 0 };
index 2e5f24e..157dfb4 100644 (file)
@@ -25,7 +25,7 @@ collections {
        base_scale: 2.6;                // multi scale for HD resolution
 
        #include "../../edc/common/email-colors.edc"
-       #include "../../edc/common/email-round-icon-button-style.edc"
+       #include "../../edc/common/email-flat-buttons.edc"
        #include "../../edc/common/email-parts.edc"
        #include "../../edc/composer/email-composer-edc-common.edc"
        #include "../../edc/composer/email-composer-layouts.edc"
index 832f0e5..23aaf81 100644 (file)
@@ -19,6 +19,6 @@ collections {
        base_scale: 2.6;                // multi scale for HD resolution
 
        #include "../../edc/common/email-colors.edc"
-       #include "../../edc/common/email-round-icon-button-style.edc"
+       #include "../../edc/common/email-flat-buttons.edc"
        #include "../../edc/filter/email-filter-address-edit-view.edc"
 }
index b916670..123d3e1 100644 (file)
@@ -20,7 +20,7 @@ collections {
        base_scale: 2.6;                // multi scale for HD resolution
 
        #include "../../edc/common/email-colors.edc"
-       #include "../../edc/common/email-round-icon-button-style.edc"
+       #include "../../edc/common/email-flat-buttons.edc"
        #include "../../edc/common/email-parts.edc"
        #include "../../edc/viewer/email-viewer-base-layout.edc"
        #include "../../edc/viewer/email-viewer-subject-layout.edc"