From 80b2e7dbfda97117fb138ef1d339fc366751d55c Mon Sep 17 00:00:00 2001 From: Hyoyoung Chang Date: Thu, 11 Aug 2011 16:29:05 +0900 Subject: [PATCH] [genlist] make selected text invisible at renamed Change-Id: I400d0a7c61b4c13cc0c7f7cc034aafcdce0542ba --- themes/groups/genlist/genlist_macro.edc | 19 +++++++++++++++++++ themes/groups/genlist/genlist_styles.edc | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/themes/groups/genlist/genlist_macro.edc b/themes/groups/genlist/genlist_macro.edc index 8ef52b5..9130368 100644 --- a/themes/groups/genlist/genlist_macro.edc +++ b/themes/groups/genlist/genlist_macro.edc @@ -541,12 +541,30 @@ } \ } +#define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \ + description { state: "selected" 1.0; \ + inherit: "default" 0.0; \ + visible: 0; \ + } + #define GENLIST_DESCRIPTION_RENAME_ENABLED \ description { state: "rename_enabled" 0.0; \ inherit: "default" 0.0; \ visible: 0; \ } +#define GENLIST_PROGRAM_SCRIPT_RENAME_SELECT_1TEXT \ + script { \ + new st[31]; \ + new Float:vl; \ + get_state(PART:"elm.text", st, 30, vl); \ + set_state(PART:"bg_image", "selected", 0.0); \ + if (!strcmp(st, "rename_enabled")) \ + set_state(PART:"elm.text", "selected", 1.0); \ + else \ + set_state(PART:"elm.text", "selected", 0.0); \ + } + #define GENLIST_PROGRAM_RENAME_1TEXT \ program { name: "rename_enabled"; \ signal: "elm,state,rename,enabled"; \ @@ -798,3 +816,4 @@ target: "elm.icon.3"; \ target: "elm.edit.rename"; \ } + diff --git a/themes/groups/genlist/genlist_styles.edc b/themes/groups/genlist/genlist_styles.edc index 8b3286c..a9fa7b2 100644 --- a/themes/groups/genlist/genlist_styles.edc +++ b/themes/groups/genlist/genlist_styles.edc @@ -356,6 +356,7 @@ inherit: "default" 0.0; color: GENLIST_PART_TEXT_SELECTED_COLOR_INC; } + GENLIST_DESCRIPTION_INVISIBLE_SELECTED GENLIST_DESCRIPTION_RENAME_ENABLED } GENLIST_PART_RENAME @@ -371,8 +372,7 @@ signal: "elm,state,selected"; source: "elm"; action: STATE_SET "selected" 0.0; - target: "bg_image"; - target: "elm.text"; + GENLIST_PROGRAM_SCRIPT_RENAME_SELECT_1TEXT } program { name: "go_passive"; signal: "elm,state,unselected"; -- 2.7.4