From bad9efd8f7316c5d4e6b1358449e82693b5fbc87 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 30 May 2012 00:52:18 +0000 Subject: [PATCH] elementary: make expand effect faster. This a team work, half of the borkage by zmike and half by me. I hope we succeed. NOTE: It is better to do one smart object that you apply map on it, that to apply map on it's 10 childs separately. SVN revision: 71520 --- .../data/themes/widgets/genlist.edc | 276 +++++++----------- 1 file changed, 99 insertions(+), 177 deletions(-) diff --git a/legacy/elementary/data/themes/widgets/genlist.edc b/legacy/elementary/data/themes/widgets/genlist.edc index 9e6353b1c3..42d0292d75 100644 --- a/legacy/elementary/data/themes/widgets/genlist.edc +++ b/legacy/elementary/data/themes/widgets/genlist.edc @@ -702,13 +702,13 @@ group { name: "elm/genlist/item_compress/message/default"; } styles { style { name: "genlist_textblock_style"; - base: "font=Sans font_size=10 color=#000 wrap=char text_class=list_item"; + base: "font=Sans font_size=10 color=#000 wrap=none text_class=list_item"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; } style { name: "genlist_textblock_style2"; - base: "font=Sans font_size=10 color=#fff wrap=char text_class=list_item"; + base: "font=Sans font_size=10 color=#fff wrap=none text_class=list_item"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; @@ -9611,6 +9611,103 @@ group { name: "elm/genlist/tree/tree_effect/default"; data.item: "texts" "elm.text"; data.item: "contents" "elm.swallow.icon elm.swallow.end"; data.item: "treesize" "20"; + broadcast_signal: 1; + parts { + alias: "elm.swallow.pad" "group:elm.swallow.pad"; + alias: "elm.swallow.icon" "group:elm.swallow.icon"; + alias: "elm.swallow.end" "group:elm.swallow.end"; + alias: "elm.text" "group:elm.text"; + part { name: "point"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + color: 0 0 0 0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 0.0; } + } + } + part { + name: "event"; + type: RECT; + repeat_events: 1; + description { + state: "default" 0.0; + color: 0 0 0 0; + } + } + part { name: "group"; + type: GROUP; + source: "elm/genlist/tree/effect_parts/default"; + repeat_events: 1; + description { + state: "default" 0.0; + } + GENLIST_PART_MAP_START(-90.0, 0, 0) + GENLIST_PART_MAP_FINISH(0, 0, 0) + } + } + programs { + program { + name: "rotaion_transition"; + signal: "flip_item"; + action: STATE_SET "map_transition" 0.0; + after: "rotation"; + target: "group"; + } + program { + name: "rotation"; + action: STATE_SET "map_rotate" 0.0; + transition: LINEAR 0.2; + after: "rotation_end"; + target: "group"; + } + program { + name: "rotation_end"; + action: STATE_SET "default" 0.0; + target: "group"; + } + program { + name: "rotation_transition2"; + signal: "elm,state,contract_flip"; + action: STATE_SET "map_rotate" 0.0; + after: "rotation2"; + target: "group"; + } + program { + name: "rotation2"; + action: STATE_SET "map_transition" 0.0; + transition: LINEAR 0.5; + after: "rotation3"; + target: "group"; + } + program { + name: "rotation3"; + action: STATE_SET "hide" 0.0; + target: "group"; + } + program { + name: "show"; + signal: "elm,state,show"; + action: STATE_SET "default" 0.0; + target: "group"; + } + program { + name: "hide"; + signal: "elm,state,hide"; + action: STATE_SET "hide" 0.0; + target: "group"; + } + program { + name: "expand"; + signal: "mouse,up,1"; + source: "group:arrow"; + action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; + } + } +} + +group { name: "elm/genlist/tree/effect_parts/default"; images { image: "bt_sm_base1.png" COMP; image: "bt_sm_shine.png" COMP; @@ -9623,25 +9720,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; image: "icon_arrow_down.png" COMP; } parts { - part { name: "point"; - type: RECT; - scale: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 0.0; } - } - } - part { - name: "event"; - type: RECT; - repeat_events: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } part { name: "reorder_bg"; mouse_events: 0; description { state: "default" 0.0; @@ -9694,8 +9772,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; inherit: "default" 0.0; visible: 0; } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "base"; @@ -9713,8 +9789,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; inherit: "default" 0.0; image.normal: "ilist_2.png"; } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "bg"; clip_to: "disclip"; @@ -9749,8 +9823,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; offset: 1 1; } } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "elm.swallow.pad"; type: SWALLOW; @@ -9766,8 +9838,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; offset: 4 -5; } } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "arrow"; clip_to: "disclip"; @@ -9800,8 +9870,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; inherit: "default" 0.0; image.normal: "icon_arrow_down.png"; } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "elm.swallow.icon"; clip_to: "disclip"; @@ -9820,8 +9888,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; offset: 4 -5; } } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "elm.swallow.end"; clip_to: "disclip"; @@ -9840,8 +9906,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; offset: -5 -5; } } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "elm.text"; clip_to: "disclip"; @@ -9876,8 +9940,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; color: 224 224 224 255; color3: 0 0 0 64; } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "fg1"; clip_to: "disclip"; @@ -9898,8 +9960,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; visible: 1; color: 255 255 255 255; } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "fg2"; clip_to: "disclip"; @@ -9919,8 +9979,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; visible: 1; color: 255 255 255 255; } - GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) - GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) } part { name: "disclip"; type: RECT; @@ -10007,12 +10065,6 @@ group { name: "elm/genlist/tree/tree_effect/default"; target: "reorder_bg"; transition: DECELERATE 0.5; } - program { - name: "expand"; - signal: "mouse,up,1"; - source: "arrow"; - action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; - } program { name: "go_expanded"; signal: "elm,state,expanded"; @@ -10059,135 +10111,5 @@ group { name: "elm/genlist/tree/tree_effect/default"; } } } - program { - name: "rotaion_transition"; - signal: "flip_item"; - action: STATE_SET "map_transition" 0.0; - after: "rotation"; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } - program { - name: "rotation"; - action: STATE_SET "map_rotate" 0.0; - transition: LINEAR 0.2; - after: "rotation_end"; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } - program { - name: "rotation_end"; - action: STATE_SET "default" 0.0; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } - program { - name: "rotation_transition2"; - signal: "elm,state,contract_flip"; - action: STATE_SET "map_rotate" 0.0; - after: "rotation2"; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } - program { - name: "rotation2"; - action: STATE_SET "map_transition" 0.0; - transition: LINEAR 0.5; - after: "rotation3"; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } - program { - name: "rotation3"; - action: STATE_SET "hide" 0.0; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } - program { - name: "show"; - signal: "elm,state,show"; - action: STATE_SET "default" 0.0; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } - program { - name: "hide"; - signal: "elm,state,hide"; - action: STATE_SET "hide" 0.0; - target: "reorder_bg"; - target: "base_sh"; - target: "base"; - target: "bg"; - target: "arrow"; - target: "elm.swallow.pad"; - target: "elm.swallow.icon"; - target: "elm.swallow.end"; - target: "elm.text"; - target: "fg1"; - target: "fg2"; - } } }