From 90038b46e28853f299f6031ccb1ae62bea47cf95 Mon Sep 17 00:00:00 2001 From: Tae-Hwan Kim Date: Wed, 5 Sep 2012 22:15:13 +0900 Subject: Fix reorder mode for the situation that swallow content is NULL Change-Id: I03c90a12997cb243bb6d62531455c08cb84319b6 --- themes/widgets/genlist/genlist_decorate.edc | 47 +++++++++++++++++------------ themes/widgets/genlist/genlist_macro.edc | 33 +++++++++----------- 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/themes/widgets/genlist/genlist_decorate.edc b/themes/widgets/genlist/genlist_decorate.edc index 78a1cbb9..8f7faf47 100644 --- a/themes/widgets/genlist/genlist_decorate.edc +++ b/themes/widgets/genlist/genlist_decorate.edc @@ -36,10 +36,11 @@ image: "01_list_reorder_bg_below.png" COMP; } parts { + GENLIST_PART_DISCLIP GENLIST_PART_BG_IMAGE - GENLIST_PART_BASE_REORDER( 112 ) + GENLIST_PART_BASE_REORDER( GENLIST_HEIGHT_1LINE + 8 ) GENLIST_PART_BOTTOM_LINE - + // FIXME: right padding is not needed when swallow content is NULL. GENLIST_PART_PADDING_RIGHT( 16 ) GENLIST_PART_PADDING_LEFT_TO("elm.padding.icon1.left", "reorder.padding.left", 16) @@ -47,20 +48,27 @@ clip_to: "disclip"; type: SWALLOW; scale: 1; - GENLIST_DESCRIPTION_L("elm.padding.icon1.left", min: 60 0; align: 1 0.5; ) + GENLIST_DESCRIPTION_L("elm.padding.icon1.left", align: 1 0.5; ) description { state: "decorate" 0.0; inherit: "default" 0.0; align: 0 0.5; } - GENLIST_DESCRIPTION_FLIP_ENABLED + description { state: "flip_enabled" 0.0; + inherit: "default" 0.0; + visible: 0; + } } GENLIST_PART_PADDING_LEFT_TO("elm.padding.icon1.right", "elm.edit.icon.1", 16) + part { name: "content_disclip"; + type: RECT; + description { state: "default" 0.0; + } + } part { name: "elm.swallow.decorate.content"; - clip_to: "disclip"; + clip_to: "content_disclip"; type: SWALLOW; - mouse_events: 1; scale: 1; - GENLIST_DESCRIPTION_LR( "elm.padding.icon1.right", "elm.padding.icon2.left", ) + GENLIST_DESCRIPTION_LR("elm.padding.icon1.right", "elm.edit.icon.2", ) description { state: "flip_enabled" 0.0; inherit: "default" 0.0; rel1 { @@ -75,57 +83,58 @@ } } } - GENLIST_PART_PADDING_RIGHT_TO("elm.padding.icon2.left", "elm.edit.icon.2", 16) part { name: "elm.edit.icon.2"; clip_to: "disclip"; type: SWALLOW; scale: 1; - GENLIST_DESCRIPTION_R( "elm.padding.icon2.right", min: 48 48; align: 0 0.5; ) + GENLIST_DESCRIPTION_R("elm.padding.right", align: 0 0.5; ) description { state: "decorate" 0.0; inherit: "default" 0.0; - align: 1 0.5; + align: 1 .0.5; + } + description { state: "flip_enabled" 0.0; + inherit: "default" 0.0; + visible: 0; } - GENLIST_DESCRIPTION_FLIP_ENABLED } - GENLIST_PART_PADDING_RIGHT_TO("elm.padding.icon2.right", "elm.padding.right", 16) - GENLIST_PART_DISCLIP } programs { GENLIST_PROGRAM_DISCLIP GENLIST_PROGRAM_SELECT( ; ) GENLIST_PROGRAM_REORDER + GENLIST_PROGRAM_FLIP_TARGET(target: "elm.swallow.decorate.content";) program { name: "decorate_enabled_effect"; signal: "elm,state,decorate,enabled,effect"; source: "elm"; - action: STATE_SET "decorate" 0.0; transition: DECELERATE 0.7; + action: STATE_SET "decorate" 0.0; target: "elm.edit.icon.1"; target: "elm.edit.icon.2"; } program { name: "decorate_disabled_effect"; signal: "elm,state,decorate,disabled,effect"; source: "elm"; - action: STATE_SET "default" 0.0; transition: DECELERATE 0.7; + action: STATE_SET "default" 0.0; + target: "elm.swallow.decorate.content"; target: "elm.edit.icon.1"; target: "elm.edit.icon.2"; } program { name: "decorate_enabled"; signal: "elm,state,decorate,enabled"; source: "elm"; - action: STATE_SET "decorate" 0.0; + action: STATE_SET "decorate" 0.0; target: "elm.edit.icon.1"; target: "elm.edit.icon.2"; } program { name: "decorate_disabled"; signal: "elm,state,decorate,disabled"; source: "elm"; - action: STATE_SET "default" 0.0; + action: STATE_SET "default" 0.0; + target: "elm.swallow.decorate.content"; target: "elm.edit.icon.1"; target: "elm.edit.icon.2"; } - GENLIST_PROGRAM_FLIP_TARGET( target: "elm.edit.icon.1"; target: "elm.edit.icon.2";, - target: "elm.swallow.decorate.content"; ) } } diff --git a/themes/widgets/genlist/genlist_macro.edc b/themes/widgets/genlist/genlist_macro.edc index da1f52f5..3bb7979c 100644 --- a/themes/widgets/genlist/genlist_macro.edc +++ b/themes/widgets/genlist/genlist_macro.edc @@ -314,7 +314,7 @@ min: 0 HEIGHT; \ align: 0.5 0.5; \ color: 0 0 0 0; \ - rel2.offset: -1 0;\ + rel2.offset: 0 -1; \ } \ } @@ -332,6 +332,7 @@ to_x: "reorder.padding.left"; \ to_y: "reorder.padding.top"; \ } \ + rel2.offset: 0 -1; \ } \ } \ part { name: "reorder.padding.left"; \ @@ -398,6 +399,7 @@ min: 0 1; \ fixed: 0 1; \ visible: 1; \ + align: 0.5 0; \ color: GENLIST_PART_LIST_LINE_COLOR_INC; \ rel1 { \ relative: 0.0 1.0; \ @@ -764,10 +766,6 @@ inherit: "default" 0.0; \ color: GENLIST_PART_DISCLIP_COLOR; \ } \ - description { state: "disabled" 0.0; \ - inherit: "default" 0.0; \ - color: GENLIST_PART_DISCLIP_COLOR; \ - } \ description { state: "flip_enabled" 0.0; \ inherit: "default" 0.0; \ visible: 0; \ @@ -1536,36 +1534,38 @@ target: "reorder.padding.left"; \ target: "reorder.padding.top"; \ target: "bottom_line"; \ - } \ + } -#define GENLIST_PROGRAM_FLIP_TARGET( DISABLE_TARGET, FLIP_TARGET ) \ +#define GENLIST_PROGRAM_FLIP \ program { name: "flip_enabled"; \ signal: "elm,state,flip,enabled"; \ source: "elm"; \ action: STATE_SET "flip_enabled" 0.0; \ - DISABLE_TARGET \ + target: "disclip"; \ after: "flip_enabled_next"; \ } \ program { name: "flip_enabled_next"; \ action: STATE_SET "flip_enabled" 0.0; \ transition: DECELERATE 0.5; \ - FLIP_TARGET \ + target: "elm.flip.content"; \ + target: "elm.flip.icon"; \ } \ program { name: "flip_disabled"; \ signal: "elm,state,flip,disabled"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ transition: DECELERATE 0.5; \ - FLIP_TARGET \ + target: "elm.flip.content"; \ + target: "elm.flip.icon"; \ after: "flip_disabled_next"; \ } \ program { name: "flip_disabled_next"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ - DISABLE_TARGET \ + target: "disclip"; \ } -#define GENLIST_PROGRAM_FLIP \ +#define GENLIST_PROGRAM_FLIP_TARGET( TARGET ) \ program { name: "flip_enabled"; \ signal: "elm,state,flip,enabled"; \ source: "elm"; \ @@ -1576,16 +1576,14 @@ program { name: "flip_enabled_next"; \ action: STATE_SET "flip_enabled" 0.0; \ transition: DECELERATE 0.5; \ - target: "elm.flip.content"; \ - target: "elm.flip.icon"; \ + TARGET \ } \ program { name: "flip_disabled"; \ signal: "elm,state,flip,disabled"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ transition: DECELERATE 0.5; \ - target: "elm.flip.content"; \ - target: "elm.flip.icon"; \ + TARGET \ after: "flip_disabled_next"; \ } \ program { name: "flip_disabled_next"; \ @@ -1593,9 +1591,6 @@ action: STATE_SET "default" 0.0; \ target: "disclip"; \ } -/* genlist multisense macro - end */ - - #define GENLIST_PART_TEXT_LISTITEM1(NAME, LEFT, RIGHT) \ part { name: NAME; \ -- cgit v1.2.3