From da38dd11173af0cfaa47b16ec07e9faa25041d9a Mon Sep 17 00:00:00 2001 From: Amit Kamboj Date: Tue, 25 Jun 2013 17:30:16 +0530 Subject: [PATCH] [Check] Added press effect for genlist and gengrid styles for Dark theme 0.7 Change-Id: I7a800750b4ae5693efe157af5a6ef1d9da145e2f --- themes/inc/tizen-dark-inc.edc | 10 ++-- themes/inc/tizen-light-inc.edc | 10 ++-- themes/widgets/check.edc | 120 +++++++++++++++++++++++++++++++---------- themes/widgets/radio.edc | 17 ++++-- 4 files changed, 114 insertions(+), 43 deletions(-) diff --git a/themes/inc/tizen-dark-inc.edc b/themes/inc/tizen-dark-inc.edc index fc0214a..910187d 100755 --- a/themes/inc/tizen-dark-inc.edc +++ b/themes/inc/tizen-dark-inc.edc @@ -772,15 +772,13 @@ #define BUTTON_DISCLIP_NORMAL_COLOR_INC 255 255 255 255 #define BUTTON_DISCLIP_DISABLED_COLOR_INC 255 255 255 76 -#define CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC "#FFFFFF" -#define CHECK_DEFAULT_TEXT_PRESSED_COLOR_INC 255 255 255 255 -#define CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC 58 58 58 76 +#define CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC "#FAFAFAFF" +#define CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC "#FAFAFA7F" #define CHECK_DISCLIP_NORMAL_COLOR_INC 255 255 255 255 #define CHECK_DISCLIP_DISABLED_COLOR_INC 255 255 255 76 -#define RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC "#FFFFFF" -#define RADIO_DEFAULT_TEXT_PRESSED_COLOR_INC 255 255 255 255 -#define RADIO_DEFAULT_TEXT_DISABLED_COLOR_INC 58 58 58 76 +#define RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC "#FAFAFAFF" +#define RADIO_DEFAULT_TEXT_DISABLED_COLOR_INC "#FAFAFA7F" #define RADIO_DISCLIP_NORMAL_COLOR_INC 255 255 255 255 #define RADIO_DISCLIP_DISABLED_COLOR_INC 255 255 255 76 diff --git a/themes/inc/tizen-light-inc.edc b/themes/inc/tizen-light-inc.edc index a39b818..a1812ca 100755 --- a/themes/inc/tizen-light-inc.edc +++ b/themes/inc/tizen-light-inc.edc @@ -801,15 +801,13 @@ #define BUTTON_DISCLIP_NORMAL_COLOR_INC 255 255 255 255 #define BUTTON_DISCLIP_DISABLED_COLOR_INC 255 255 255 76 -#define CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC "#3A3A3A" -#define CHECK_DEFAULT_TEXT_PRESSED_COLOR_INC 255 255 255 255 -#define CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC 58 58 58 76 +#define CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC "#3A3A3AFF" +#define CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC "#3A3A3A7F" #define CHECK_DISCLIP_NORMAL_COLOR_INC 255 255 255 255 #define CHECK_DISCLIP_DISABLED_COLOR_INC 255 255 255 76 -#define RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC "#3A3A3A" -#define RADIO_DEFAULT_TEXT_PRESSED_COLOR_INC 255 255 255 255 -#define RADIO_DEFAULT_TEXT_DISABLED_COLOR_INC 58 58 58 76 +#define RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC "#3A3A3AFF" +#define RADIO_DEFAULT_TEXT_DISABLED_COLOR_INC "#3A3A3A7F" #define RADIO_DISCLIP_NORMAL_COLOR_INC 255 255 255 255 #define RADIO_DISCLIP_DISABLED_COLOR_INC 255 255 255 76 diff --git a/themes/widgets/check.edc b/themes/widgets/check.edc index a5a4d2f..416048e 100644 --- a/themes/widgets/check.edc +++ b/themes/widgets/check.edc @@ -24,6 +24,28 @@ #define CHECK_HIDE 0 #define CHECK_SHOW 1 + + styles { + style { name: "check_label_textblock_style"; + base: "font=Tizen:style=Regular font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color="CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC" wrap=char text_class=tizen"; + tag: "br" "\n"; + tag: "ps" "ps"; + tag: "hilight" "+ font=Tizen:style=Bold"; + tag: "b" "+ font=Tizen:style=Bold"; + tag: "whitecolor" "+ color=#ffffff"; + tag: "tab" "\t"; + } + style { name: "check_label_textblock_style_disable"; + base: "font=Tizen:style=Regular font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color="CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC" wrap=char text_class=tizen"; + tag: "br" "\n"; + tag: "ps" "ps"; + tag: "hilight" "+ font=Tizen:style=Bold"; + tag: "b" "+ font=Tizen:style=Bold"; + tag: "whitecolor" "+ color=#ffffff"; + tag: "tab" "\t"; + } + } + //////////////////////////////////////////////////////////////////////////////// #define CHECK_STYLE_DEFAULT(style_name, min_width, min_height) \ group { name: "elm/check/base/"style_name; \ @@ -195,8 +217,10 @@ description { state: "disabled_visible" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ - text.min: 1 1; \ - color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \ + text { \ + style: "check_label_textblock_style_disable"; \ + min: 1 1; \ + } \ } \ } \ part { name: "events1"; \ @@ -433,6 +457,7 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI images { \ image: "00_check_bg.png" COMP; \ image: "00_check_dim_bg.png" COMP; \ + image: "00_check_press_bg.png" COMP; \ image: "00_check_activated_dim.png" COMP; \ image: "00_check_activated.png" COMP; \ } \ @@ -469,7 +494,6 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI } \ description { state: "pressed" 0.0; \ inherit: "default" 0.0; \ - image.normal: "00_check_press_bg.png"; \ } \ description { state: "disabled" 0.0; \ inherit: "default" 0.0; \ @@ -502,6 +526,20 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI inherit: "visible" 0.0; \ } \ } \ + part { name: "pressed_effect"; \ + mouse_events: 0; \ + scale: 1; \ + description { state: "default" 0.0; \ + rel1.to: "bg"; \ + rel2.to: "bg"; \ + visible: 0; \ + image.normal: "00_check_press_bg.png"; \ + } \ + description { state: "pressed" 0.0; \ + inherit: "default" 0.0; \ + visible: 1; \ + } \ + } \ part { name: "sequence_clip"; \ type: RECT; \ mouse_events: 0; \ @@ -583,8 +621,10 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI description { state: "disabled_visible" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ - text.min: 1 1; \ - color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \ + text { \ + style: "check_label_textblock_style_disable"; \ + min: 1 1; \ + } \ } \ } \ part { name: "disclip"; \ @@ -636,6 +676,7 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI set_state(PART:"check", "default", 0.0); \ } \ set_state(PART:"bg", "default", 0.0); \ + set_state(PART:"pressed_effect", "default", 0.0); \ } \ } \ program { name: "pressed"; \ @@ -648,6 +689,7 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI set_state(PART:"check", "pressed", 0.0); \ } \ set_state(PART:"bg", "pressed", 0.0); \ + set_state(PART:"pressed_effect", "pressed", 0.0); \ } \ } \ program { name: "mouse,out"; \ @@ -929,8 +971,10 @@ CHECK_STYLE_DEFAULT_GENLIST("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IM description { state: "disabled_visible" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ - text.min: 1 1; \ - color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \ + text { \ + style: "check_label_textblock_style_disable"; \ + min: 1 1; \ + } \ } \ } \ part { name: "events1"; \ @@ -1094,18 +1138,6 @@ CHECK_STYLE_DEFAULT_GENLIST("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IM //////////////////////////////////////////////////////////////////////////////// CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_FAVORITE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC) //////////////////////////////////////////////////////////////////////////////// - styles { - style { name: "check_label_textblock_style"; - base: "font=Tizen:style=Roman font_size="CHECK_DEFAULT_TEXT_FONT_SIZE_INC" color="CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC" wrap=char text_class=tizen"; - tag: "br" "\n"; - tag: "ps" "ps"; - tag: "hilight" "+ font=Tizen:style=Bold"; - tag: "b" "+ font=Tizen:style=Bold"; - tag: "whitecolor" "+ color=#ffffff"; - tag: "tab" "\t"; - } - } - group { name: "elm/check/base/on&off"; images { image: "00_button_on_handler.png" COMP; @@ -1463,7 +1495,10 @@ CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_ description { state: "disabled_visible" 0.0; inherit: "default" 0.0; visible: 1; - text.min: 1 1; + text { + style: "check_label_textblock_style_disable"; + min: 1 1; + } } } part { name: "disclip"; @@ -1834,8 +1869,10 @@ CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_ description { state: "disabled_visible" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ - text.min: 1 1; \ - color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \ + text { \ + style: "check_label_textblock_style_disable"; \ + min: 1 1; \ + } \ } \ } \ part { name: "disclip"; \ @@ -1977,10 +2014,13 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i //////////////////////////////////////////////////////////////////////////////// group { name: "elm/check/base/grid"; - images.image: "00_check_bg.png" COMP; - images.image: "00_check_dim_bg.png" COMP; - images.image: "00_check_activated_dim.png" COMP; - images.image: "00_check_activated.png" COMP; + images { + image: "00_check_bg.png" COMP; + image: "00_check_dim_bg.png" COMP; + image: "00_check_activated_dim.png" COMP; + image: "00_check_activated.png" COMP; + image: "00_check_press_bg.png" COMP; + } script { public check_state = CHECK_STATE_DEFAULT; public check_visible = CHECK_HIDE; @@ -2062,6 +2102,20 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i image.normal: "00_check_activated_dim.png"; } } + part { name: "pressed_effect"; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + rel1.to: "bg2"; + rel2.to: "bg2"; + visible: 0; + image.normal: "00_check_press_bg.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } part { name: "sequence_clip"; type: RECT; mouse_events: 0; @@ -2148,8 +2202,10 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i description { state: "disabled_visible" 0.0; inherit: "default" 0.0; visible: 1; - text.min: 1 1; - color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; + text { + style: "check_label_textblock_style_disable"; + min: 1 1; + } } } part { name: "events"; @@ -2195,6 +2251,12 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i set_state(PART:"bg2", "default", 0.0); } } + program { name: "unpress"; + signal: "mouse,up,1"; + source: "events"; + action: STATE_SET "default" 0.0; + target: "pressed_effect"; + } program { name: "pressed"; signal: "mouse,down,1"; source: "events"; @@ -2207,6 +2269,7 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i set_state(PART:"check", "pressed", 0.0); set_state(PART:"bg2", "visible", 0.0); } + set_state(PART:"pressed_effect", "pressed", 0.0); } } program { name: "mouse,out"; @@ -2225,6 +2288,7 @@ CHECK_STYLE_FAVORITE("favorite/extended", "00_icon_favorite_on_72x72.png", "00_i set_state(PART:"sequence_clip", "default", 0.0); set_state(PART:"bg2", "default", 0.0); } + set_state(PART:"pressed_effect", "default", 0.0); } } program { name: "check_on"; diff --git a/themes/widgets/radio.edc b/themes/widgets/radio.edc index 525c6f5..38d1e03 100644 --- a/themes/widgets/radio.edc +++ b/themes/widgets/radio.edc @@ -20,7 +20,16 @@ styles { style { name: "radio_label_textblock_style"; - base: "font=Tizen:style=Medium font_size="RADIO_STYLE_DEFAULT_FONT_SIZE_INC" color="RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC" wrap=char text_class=tizen"; + base: "font=Tizen:style=Regular font_size="RADIO_STYLE_DEFAULT_FONT_SIZE_INC" color="RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC" wrap=char text_class=tizen"; + tag: "br" "\n"; + tag: "ps" "ps"; + tag: "hilight" "+ font=Tizen:style=Bold"; + tag: "b" "+ font=Tizen:style=Bold"; + tag: "whitecolor" "+ color=#ffffff"; + tag: "tab" "\t"; + } + style { name: "radio_label_textblock_style_disable"; + base: "font=Tizen:style=Regular font_size="RADIO_STYLE_DEFAULT_FONT_SIZE_INC" color="RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC" wrap=char text_class=tizen"; tag: "br" "\n"; tag: "ps" "ps"; tag: "hilight" "+ font=Tizen:style=Bold"; @@ -195,8 +204,10 @@ description { state: "disabled_visible" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ - text.min: 1 1; \ - color: RADIO_DEFAULT_TEXT_DISABLED_COLOR_INC; \ + text { \ + style: "radio_label_textblock_style_disable"; \ + min: 0 0; \ + } \ } \ } \ part { name: "over1"; \ -- 2.7.4