From 59bd8755ecb975ec826a329fb2006038219bd91d Mon Sep 17 00:00:00 2001 From: Rajeev Ranjan Date: Fri, 9 Sep 2011 12:48:41 +0900 Subject: [PATCH] Tickernoti "clicked" signal emission on clicking the area other than the button Change-Id: I35620efaf430820b95009c47fc6ffec5beeb667a --- themes/groups/tickernoti.edc | 164 ++++++++++++++++++++++++++----------------- 1 file changed, 101 insertions(+), 63 deletions(-) diff --git a/themes/groups/tickernoti.edc b/themes/groups/tickernoti.edc index d98f370..ce702e1 100644 --- a/themes/groups/tickernoti.edc +++ b/themes/groups/tickernoti.edc @@ -31,7 +31,6 @@ } parts { part { name: "base"; - mouse_events: 0; type: RECT; scale: 1; description { state: "default" 0.0; @@ -122,7 +121,7 @@ name: "icon"; type: SWALLOW; scale: 1; - mouse_events: 0; + mouse_events: 1; description { state: "default" 0.0; fixed: 1 0; @@ -186,6 +185,20 @@ } } } + part { + name: "event"; + mouse_events: 1; + repeat_events: 1; + description {state: "default" 0.0; + color: 0 0 0 0; + rel1 { + to: "bg"; + } + rel2 { + to: "bg"; + } + } + } } programs { program { @@ -199,8 +212,13 @@ } program { name: "other_click"; - signal: "mouse,down,1"; + signal: "mouse,clicked,1"; source: "bg"; + action: SIGNAL_EMIT "clicked" ""; + after: "effect_hide"; + } + program { + name: "effect_hide"; action: STATE_SET "default" "0.0"; transition: DECEL 0.4; target: "bg"; @@ -233,8 +251,7 @@ } parts { part { - name: "bg"; - mouse_events: 0; + name: "base"; type: RECT; scale: 1; description { state: "default" 0.0; @@ -249,21 +266,21 @@ } } part { - name: "bg_2line"; + name: "bg"; mouse_events: 1; type: RECT; - clip_to: "bg"; + clip_to: "base"; scale: 1; description { state: "default" 0.0; visible: 1; align: 0.5 0.0; rel1 { relative: 0.0 -1.0; - to: "bg"; + to: "base"; } rel2 { relative: 1.0 0.0; - to: "bg"; + to: "base"; } color: 0 0 0 0; } @@ -271,16 +288,16 @@ inherit: "default" 0.0; rel1 { relative: 0.0 0.0; - to: "bg"; + to: "base"; } rel2 { relative: 1.0 1.0; - to: "bg"; + to: "base"; } } } part { - name: "bg_2line_img"; + name: "bg_img"; mouse_events: 0; type: IMAGE; scale: 1; @@ -288,11 +305,11 @@ visible: 1; rel1 { relative: 0.0 0.0; - to: "bg_2line"; + to: "bg"; } rel2 { relative: 1.0 1.0; - to: "bg_2line"; + to: "bg"; } image.normal: "00_winset_notification_bg.png"; } @@ -310,11 +327,11 @@ align: 0.0 0.0; rel1 { relative: 0.0 0.0; - to: "bg_2line"; + to: "bg"; } rel2 { relative: 0.0 0.0; - to: "bg_2line"; + to: "bg"; } } } @@ -331,11 +348,11 @@ align: 1.0 1.0; rel1 { relative: 1.0 1.0; - to: "bg_2line"; + to: "bg"; } rel2 { relative: 1.0 1.0; - to: "bg_2line"; + to: "bg"; } } } @@ -385,6 +402,63 @@ } } } + /* Text */ + part { + name: "text_rect"; + type: RECT; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + align: 0.0 0.5; + rel1 { + relative: 1.0 0.0; + to: "padding_icon_right"; + } + rel2 { + relative: 0.0 0.0; + to_x: "padding_button_left"; + to_y: "padding_right_bottom"; + } + } + } + part { + name: "elm.text"; + type: TEXTBLOCK; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + to: "text_rect"; + } + rel2 { + relative: 1.0 1.0; + to: "text_rect"; + } + align: 0.0 0.5; + text { + style: "style_text"; + max: 0 1; + } + } + } + part { + name: "event"; + mouse_events: 1; + repeat_events: 1; + description {state: "default" 0.0; + color: 0 0 0 0; + rel1 { + to: "bg"; + } + rel2 { + to: "bg"; + } + } + } // Button part { name: "button"; @@ -428,49 +502,6 @@ } } } - /* Text */ - part { - name: "text_rect"; - type: RECT; - scale: 1; - mouse_events: 1; - description { - state: "default" 0.0; - visible: 0; - align: 0.0 0.5; - rel1 { - relative: 1.0 0.0; - to: "padding_icon_right"; - } - rel2 { - relative: 0.0 0.0; - to_x: "padding_button_left"; - to_y: "padding_right_bottom"; - } - } - } - part { - name: "elm.text"; - type: TEXTBLOCK; - scale: 1; - mouse_events: 1; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - to: "text_rect"; - } - rel2 { - relative: 1.0 1.0; - to: "text_rect"; - } - align: 0.0 0.5; - text { - style: "style_text"; - max: 0 1; - } - } - } } programs { program { @@ -480,7 +511,14 @@ in: 0.1 0.0; action: STATE_SET "show" "0.0"; transition: ACCEL 0.4; - target: "bg_2line"; + target: "bg"; + } + program { + name: "clicked"; + signal: "mouse,clicked,1"; + source: "event"; + action: SIGNAL_EMIT "clicked" ""; + after: "effect_hide"; } program { name: "effect_hide"; @@ -488,7 +526,7 @@ source: "elm"; action: STATE_SET "default" "0.0"; transition: DECEL 0.4; - target: "bg_2line"; + target: "bg"; after: "hide"; } program { -- 2.7.4