diff --git a/legacy/elementary/data/themes/default.edc b/legacy/elementary/data/themes/default.edc index f05b218c56..dd2c4bea79 100644 --- a/legacy/elementary/data/themes/default.edc +++ b/legacy/elementary/data/themes/default.edc @@ -15645,7 +15645,6 @@ collections { /////////////////////////////////////////////////////////////////////////////// group { name: "elm/genlist/item/default/default"; - data.item: "stacking" "above"; data.item: "selectraise" "on"; data.item: "labels" "elm.text"; data.item: "icons" "elm.swallow.icon elm.swallow.end"; @@ -15656,6 +15655,7 @@ collections { image: "bt_sm_shine.png" COMP; image: "bt_sm_hilight.png" COMP; image: "ilist_1.png" COMP; + image: "ilist_2.png" COMP; image: "ilist_item_shadow.png" COMP; } parts { @@ -15691,6 +15691,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + visible: 0; + } } part { name: "base"; @@ -15703,6 +15708,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + image.normal: "ilist_2.png"; + } } part { name: "bg"; clip_to: "disclip"; @@ -15724,6 +15734,9 @@ collections { } image.middle: SOLID; } + description { state: "default" 0.1; + inherit: "default" 0.0; + } description { state: "selected" 0.0; inherit: "default" 0.0; visible: 1; @@ -15737,6 +15750,10 @@ collections { offset: 1 1; } } + description { + state: "selected" 1.0; + inherit: "selected" 0.0; + } } part { name: "elm.swallow.pad"; type: SWALLOW; @@ -15819,6 +15836,11 @@ collections { text_class: "list_item"; } } + description { + state: "default" 1.0; + inherit: "default" 0.0; + text.align: -1.0 0.5; + } description { state: "selected" 0.0; inherit: "default" 0.0; color: 224 224 224 255; @@ -15844,6 +15866,12 @@ collections { visible: 1; color: 255 255 255 255; } + description { + state: "selected" 1.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } } part { name: "fg2"; clip_to: "disclip"; @@ -15863,6 +15891,12 @@ collections { visible: 1; color: 255 255 255 255; } + description { + state: "selected" 1.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } } part { name: "disclip"; type: RECT; @@ -15882,26 +15916,51 @@ collections { // signal: elm,state,%s,passive // a "check" item named %s went passive // default is passive + program { + name: "odd"; + signal: "elm,state,odd"; + source: "elm"; + action: STATE_SET "default" 1.0; + target: "base_sh"; + target: "base"; + target: "elm.text"; + } + program { + name: "even"; + signal: "elm,state,even"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "base_sh"; + target: "base"; + target: "elm.text"; + } program { name: "go_active"; signal: "elm,state,selected"; source: "elm"; - action: STATE_SET "selected" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; + script { + new st[31]; + new Float:vl; + get_state(PART:"base", st, 30, vl); + set_state(PART:"bg", "selected", vl); + set_state(PART:"fg1", "selected", vl); + set_state(PART:"fg2", "selected", vl); + set_state(PART:"elm.text", "selected", vl); + } } program { name: "go_passive"; signal: "elm,state,unselected"; source: "elm"; - action: STATE_SET "default" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - transition: LINEAR 0.1; + script { + new st[31]; + new Float:vl; + get_state(PART:"base", st, 30, vl); + set_state(PART:"bg", "default", vl); + set_state(PART:"fg1", "default", vl); + set_state(PART:"fg2", "default", vl); + set_state(PART:"elm.text", "default", vl); + } } program { name: "go_disabled"; @@ -15920,10 +15979,7 @@ collections { } } group { name: "elm/genlist/item/group_index/default"; - alias: "elm/genlist/item_odd/group_index/default"; alias: "elm/genlist/item_compress/group_index/default"; - alias: "elm/genlist/item_compress_odd/group_index/default"; - data.item: "stacking" "above"; data.item: "selectraise" "on"; data.item: "labels" "elm.text"; data.item: "icons" "elm.swallow.icon elm.swallow.end"; @@ -16198,7 +16254,6 @@ collections { } } group { name: "elm/genlist/item_compress/message/default"; - data.item: "stacking" "above"; data.item: "selectraise" "on"; data.item: "labels" "elm.title.1 elm.title.2 elm.text"; // data.item: "icons" "elm.swallow.icon elm.swallow.end"; @@ -16209,6 +16264,7 @@ collections { image: "bt_sm_shine.png" COMP; image: "bt_sm_hilight.png" COMP; image: "ilist_1.png" COMP; + image: "ilist_2.png" COMP; image: "ilist_item_shadow.png" COMP; } styles { @@ -16258,6 +16314,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + visible: 0; + } } part { name: "base"; @@ -16270,278 +16331,10 @@ collections { } fill.smooth: 0; } - } - part { name: "bg"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1 { - relative: 0.0 0.0; - offset: -5 -5; - } - rel2 { - relative: 1.0 1.0; - offset: 4 4; - } - image { - normal: "bt_sm_base1.png"; - border: 6 6 6 6; - } - image.middle: SOLID; - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - rel1 { - relative: 0.0 0.0; - offset: -2 -2; - } - rel2 { - relative: 1.0 1.0; - offset: 1 1; - } - } - } - part { name: "elm.title.1"; - clip_to: "disclip"; - type: TEXT; - effect: SOFT_SHADOW; - mouse_events: 0; - scale: 1; description { - state: "default" 0.0; - fixed: 0 1; -// min: 16 16; - rel1 { - relative: 0.0 0.0; - offset: 4 4; - } - rel2 { - relative: 1.0 0.0; - offset: -5 4; - } - color: 0 0 0 255; - color3: 0 0 0 0; - align: 0.0 0.0; - text { - font: "Sans"; - size: 10; - min: 0 1; -// min: 1 1; - align: 0.0 0.0; - text_class: "list_item"; - } - } - description { state: "selected" 0.0; + state: "default" 1.0; inherit: "default" 0.0; - color: 224 224 224 255; - color3: 0 0 0 64; - } - } - part { name: "elm.title.2"; - clip_to: "disclip"; - type: TEXT; - effect: SOFT_SHADOW; - mouse_events: 0; - scale: 1; - description { - state: "default" 0.0; - fixed: 0 1; -// min: 16 16; - rel1 { - to_y: "elm.title.1"; - relative: 0.0 1.0; - offset: 4 0; - } - rel2 { - to_y: "elm.title.1"; - relative: 1.0 1.0; - offset: -5 0; - } - color: 0 0 0 255; - color3: 0 0 0 0; - align: 0.0 0.0; - text { - font: "Sans"; - size: 10; - min: 0 1; -// min: 1 1; - align: 0.0 0.0; - text_class: "list_item"; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - color: 224 224 224 255; - color3: 0 0 0 64; - } - } - part { name: "elm.text"; - clip_to: "disclip"; - type: TEXTBLOCK; - mouse_events: 0; - scale: 1; - description { - state: "default" 0.0; -// fixed: 0 1; -// min: 16 16; - rel1 { - to_y: "elm.title.2"; - relative: 0.0 1.0; - offset: 4 0; - } - rel2 { - relative: 1.0 1.0; - offset: -5 -5; - } - align: 0.0 0.0; - text { - style: "genlist_textblock_style"; - min: 0 1; -// min: 1 1; - align: 0.0 0.0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - text { - style: "genlist_textblock_style2"; - } - } - } - part { name: "fg1"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.relative: 1.0 0.5; - rel2.to: "bg"; - image { - normal: "bt_sm_hilight.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "fg2"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.to: "bg"; - image { - normal: "bt_sm_shine.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "disclip"; - type: RECT; - description { state: "default" 0.0; - rel1.to: "bg"; - rel2.to: "bg"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 255 255 255 64; - } - } - } - programs { - // signal: elm,state,%s,active - // a "check" item named %s went active - // signal: elm,state,%s,passive - // a "check" item named %s went passive - // default is passive - program { - name: "go_active"; - signal: "elm,state,selected"; - source: "elm"; - action: STATE_SET "selected" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.title.1"; - target: "elm.title.2"; - target: "elm.text"; - } - program { - name: "go_passive"; - signal: "elm,state,unselected"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.title.1"; - target: "elm.title.2"; - target: "elm.text"; - transition: LINEAR 0.1; - } - program { - name: "go_disabled"; - signal: "elm,state,disabled"; - source: "elm"; - action: STATE_SET "disabled" 0.0; - target: "disclip"; - } - program { - name: "go_enabled"; - signal: "elm,state,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "disclip"; - } - } - } - group { name: "elm/genlist/item_compress_odd/message/default"; - data.item: "stacking" "below"; - data.item: "selectraise" "on"; - data.item: "labels" "elm.title.1 elm.title.2 elm.text"; -// data.item: "icons" "elm.swallow.icon elm.swallow.end"; - data.item: "treesize" "20"; -// data.item: "states" ""; - images { - image: "bt_sm_base1.png" COMP; - image: "bt_sm_shine.png" COMP; - image: "bt_sm_hilight.png" COMP; - image: "ilist_2.png" COMP; - } - parts { - part { name: "event"; - type: RECT; - repeat_events: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } - part { - name: "base"; - mouse_events: 0; - description { - state: "default" 0.0; - image { - normal: "ilist_2.png"; - border: 2 2 2 2; - } - fill.smooth: 0; + image.normal: "ilist_2.png"; } } part { name: "bg"; @@ -16742,6 +16535,22 @@ collections { // signal: elm,state,%s,passive // a "check" item named %s went passive // default is passive + program { + name: "odd"; + signal: "elm,state,odd"; + source: "elm"; + action: STATE_SET "default" 1.0; + target: "base_sh"; + target: "base"; + } + program { + name: "even"; + signal: "elm,state,even"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "base_sh"; + target: "base"; + } program { name: "go_active"; signal: "elm,state,selected"; @@ -16783,8 +16592,8 @@ collections { } } } + group { name: "elm/genlist/item_compress/default/default"; - data.item: "stacking" "above"; data.item: "selectraise" "on"; data.item: "labels" "elm.text"; data.item: "icons" "elm.swallow.icon elm.swallow.end"; @@ -16795,6 +16604,7 @@ collections { image: "bt_sm_shine.png" COMP; image: "bt_sm_hilight.png" COMP; image: "ilist_1.png" COMP; + image: "ilist_2.png" COMP; image: "ilist_item_shadow.png" COMP; } parts { @@ -16830,6 +16640,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + visible: 0; + } } part { name: "base"; @@ -16842,6 +16657,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + image.normal: "ilist_2.png"; + } } part { name: "bg"; clip_to: "disclip"; @@ -17022,503 +16842,21 @@ collections { // a "check" item named %s went passive // default is passive program { - name: "go_active"; - signal: "elm,state,selected"; + name: "odd"; + signal: "elm,state,odd"; source: "elm"; - action: STATE_SET "selected" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; + action: STATE_SET "default" 1.0; + target: "base_sh"; + target: "base"; } program { - name: "go_passive"; - signal: "elm,state,unselected"; + name: "even"; + signal: "elm,state,even"; source: "elm"; action: STATE_SET "default" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - transition: LINEAR 0.1; + target: "base_sh"; + target: "base"; } - program { - name: "go_disabled"; - signal: "elm,state,disabled"; - source: "elm"; - action: STATE_SET "disabled" 0.0; - target: "disclip"; - } - program { - name: "go_enabled"; - signal: "elm,state,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "disclip"; - } - } - } - group { name: "elm/genlist/item_odd/default/default"; - data.item: "stacking" "below"; - data.item: "selectraise" "on"; - data.item: "labels" "elm.text"; - data.item: "icons" "elm.swallow.icon elm.swallow.end"; - data.item: "treesize" "20"; -// data.item: "states" ""; - images { - image: "bt_sm_base1.png" COMP; - image: "bt_sm_shine.png" COMP; - image: "bt_sm_hilight.png" COMP; - image: "ilist_2.png" COMP; - } - parts { - part { name: "event"; - type: RECT; - repeat_events: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } - part { - name: "base"; - mouse_events: 0; - description { - state: "default" 0.0; - image { - normal: "ilist_2.png"; - border: 2 2 2 2; - } - fill.smooth: 0; - } - } - part { name: "bg"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1 { - relative: 0.0 0.0; - offset: -5 -5; - } - rel2 { - relative: 1.0 1.0; - offset: 4 4; - } - image { - normal: "bt_sm_base1.png"; - border: 6 6 6 6; - } - image.middle: SOLID; - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - rel1 { - relative: 0.0 0.0; - offset: -2 -2; - } - rel2 { - relative: 1.0 1.0; - offset: 1 1; - } - } - } - part { name: "elm.swallow.pad"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - relative: 0.0 0.0; - offset: 4 4; - } - rel2 { - relative: 0.0 1.0; - offset: 4 -5; - } - } - } - part { name: "elm.swallow.icon"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - to_x: "elm.swallow.pad"; - relative: 1.0 0.0; - offset: -1 4; - } - rel2 { - to_x: "elm.swallow.pad"; - relative: 1.0 1.0; - offset: -1 -5; - } - } - } - part { name: "elm.swallow.end"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 1.0 0.5; - aspect: 1.0 1.0; - aspect_preference: VERTICAL; - rel1 { - relative: 1.0 0.0; - offset: -5 4; - } - rel2 { - relative: 1.0 1.0; - offset: -5 -5; - } - } - } - part { name: "elm.text"; - clip_to: "disclip"; - type: TEXT; - effect: SOFT_SHADOW; - mouse_events: 0; - scale: 1; - description { - state: "default" 0.0; -// min: 16 16; - rel1 { - to_x: "elm.swallow.icon"; - relative: 1.0 0.0; - offset: 0 4; - } - rel2 { - to_x: "elm.swallow.end"; - relative: 0.0 1.0; - offset: -1 -5; - } - color: 0 0 0 255; - color3: 0 0 0 0; - text { - font: "Sans"; - size: 10; - min: 1 1; -// min: 0 1; - align: -1.0 0.5; - text_class: "list_item"; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - color: 224 224 224 255; - color3: 0 0 0 64; - } - } - part { name: "fg1"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.relative: 1.0 0.5; - rel2.to: "bg"; - image { - normal: "bt_sm_hilight.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "fg2"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.to: "bg"; - image { - normal: "bt_sm_shine.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "disclip"; - type: RECT; - description { state: "default" 0.0; - rel1.to: "bg"; - rel2.to: "bg"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 255 255 255 64; - } - } - } - programs { - // signal: elm,state,%s,active - // a "check" item named %s went active - // signal: elm,state,%s,passive - // a "check" item named %s went passive - // default is passive - program { - name: "go_active"; - signal: "elm,state,selected"; - source: "elm"; - action: STATE_SET "selected" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - } - program { - name: "go_passive"; - signal: "elm,state,unselected"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - transition: LINEAR 0.1; - } - program { - name: "go_disabled"; - signal: "elm,state,disabled"; - source: "elm"; - action: STATE_SET "disabled" 0.0; - target: "disclip"; - } - program { - name: "go_enabled"; - signal: "elm,state,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "disclip"; - } - } - } - group { name: "elm/genlist/item_compress_odd/default/default"; - data.item: "stacking" "below"; - data.item: "selectraise" "on"; - data.item: "labels" "elm.text"; - data.item: "icons" "elm.swallow.icon elm.swallow.end"; - data.item: "treesize" "20"; -// data.item: "states" ""; - images { - image: "bt_sm_base1.png" COMP; - image: "bt_sm_shine.png" COMP; - image: "bt_sm_hilight.png" COMP; - image: "ilist_2.png" COMP; - } - parts { - part { name: "event"; - type: RECT; - repeat_events: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } - part { - name: "base"; - mouse_events: 0; - description { - state: "default" 0.0; - image { - normal: "ilist_2.png"; - border: 2 2 2 2; - } - fill.smooth: 0; - } - } - part { name: "bg"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1 { - relative: 0.0 0.0; - offset: -5 -5; - } - rel2 { - relative: 1.0 1.0; - offset: 4 4; - } - image { - normal: "bt_sm_base1.png"; - border: 6 6 6 6; - } - image.middle: SOLID; - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - rel1 { - relative: 0.0 0.0; - offset: -2 -2; - } - rel2 { - relative: 1.0 1.0; - offset: 1 1; - } - } - } - part { name: "elm.swallow.pad"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - relative: 0.0 0.0; - offset: 4 4; - } - rel2 { - relative: 0.0 1.0; - offset: 4 -5; - } - } - } - part { name: "elm.swallow.icon"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - to_x: "elm.swallow.pad"; - relative: 1.0 0.0; - offset: -1 4; - } - rel2 { - to_x: "elm.swallow.pad"; - relative: 1.0 1.0; - offset: -1 -5; - } - } - } - part { name: "elm.swallow.end"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 1.0 0.5; - aspect: 1.0 1.0; - aspect_preference: VERTICAL; - rel1 { - relative: 1.0 0.0; - offset: -5 4; - } - rel2 { - relative: 1.0 1.0; - offset: -5 -5; - } - } - } - part { name: "elm.text"; - clip_to: "disclip"; - type: TEXT; - effect: SOFT_SHADOW; - mouse_events: 0; - scale: 1; - description { - state: "default" 0.0; -// min: 16 16; - rel1 { - to_x: "elm.swallow.icon"; - relative: 1.0 0.0; - offset: 0 4; - } - rel2 { - to_x: "elm.swallow.end"; - relative: 0.0 1.0; - offset: -1 -5; - } - color: 0 0 0 255; - color3: 0 0 0 0; - text { - font: "Sans"; - size: 10; - min: 0 1; -// min: 1 1; - align: 0.0 0.5; - text_class: "list_item"; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - color: 224 224 224 255; - color3: 0 0 0 64; - } - } - part { name: "fg1"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.relative: 1.0 0.5; - rel2.to: "bg"; - image { - normal: "bt_sm_hilight.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "fg2"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.to: "bg"; - image { - normal: "bt_sm_shine.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "disclip"; - type: RECT; - description { state: "default" 0.0; - rel1.to: "bg"; - rel2.to: "bg"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 255 255 255 64; - } - } - } - programs { - // signal: elm,state,%s,active - // a "check" item named %s went active - // signal: elm,state,%s,passive - // a "check" item named %s went passive - // default is passive program { name: "go_active"; signal: "elm,state,selected"; @@ -17558,7 +16896,6 @@ collections { } group { name: "elm/genlist/tree/default/default"; - data.item: "stacking" "above"; data.item: "selectraise" "on"; data.item: "labels" "elm.text"; data.item: "icons" "elm.swallow.icon elm.swallow.end"; @@ -17569,6 +16906,7 @@ collections { image: "bt_sm_shine.png" COMP; image: "bt_sm_hilight.png" COMP; image: "ilist_1.png" COMP; + image: "ilist_2.png" COMP; image: "ilist_item_shadow.png" COMP; image: "icon_arrow_left.png" COMP; image: "icon_arrow_right.png" COMP; @@ -17607,6 +16945,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + visible: 0; + } } part { name: "base"; @@ -17619,6 +16962,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + image.normal: "ilist_2.png"; + } } part { name: "bg"; clip_to: "disclip"; @@ -17830,6 +17178,22 @@ collections { // signal: elm,state,%s,passive // a "check" item named %s went passive // default is passive + program { + name: "odd"; + signal: "elm,state,odd"; + source: "elm"; + action: STATE_SET "default" 1.0; + target: "base_sh"; + target: "base"; + } + program { + name: "even"; + signal: "elm,state,even"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "base_sh"; + target: "base"; + } program { name: "go_active"; signal: "elm,state,selected"; @@ -17969,6 +17333,11 @@ collections { } fill.smooth: 0; } + description { + state: "default" 1.0; + inherit: "default" 0.0; + visible: 0; + } } part { name: "base"; @@ -17981,679 +17350,10 @@ collections { } fill.smooth: 0; } - } - part { name: "bg"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1 { - relative: 0.0 0.0; - offset: -5 -5; - } - rel2 { - relative: 1.0 1.0; - offset: 4 4; - } - image { - normal: "bt_sm_base1.png"; - border: 6 6 6 6; - } - image.middle: SOLID; - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - rel1 { - relative: 0.0 0.0; - offset: -2 -2; - } - rel2 { - relative: 1.0 1.0; - offset: 1 1; - } - } - } - part { name: "elm.swallow.pad"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - relative: 0.0 0.0; - offset: 4 4; - } - rel2 { - relative: 0.0 1.0; - offset: 4 -5; - } - } - } - part { name: "arrow"; - clip_to: "disclip"; - ignore_flags: ON_HOLD; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - aspect: 1.0 1.0; - rel1 { - to_x: "elm.swallow.pad"; - relative: 1.0 0.0; - offset: -1 4; - } - rel2 { - to_x: "elm.swallow.pad"; - relative: 1.0 1.0; - offset: -1 -5; - } - image.normal: "icon_arrow_right.png"; - } - description { state: "default" 0.1; - inherit: "default" 0.0; - image.normal: "icon_arrow_left.png"; - } - description { state: "active" 0.0; - inherit: "default" 0.0; - image.normal: "icon_arrow_down.png"; - } - description { state: "active" 0.1; - inherit: "default" 0.0; - image.normal: "icon_arrow_down.png"; - } - } - part { name: "elm.swallow.icon"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - to_x: "arrow"; - relative: 1.0 0.0; - offset: 4 4; - } - rel2 { - to_x: "arrow"; - relative: 1.0 1.0; - offset: 4 -5; - } - } - } - part { name: "elm.swallow.end"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 1.0 0.5; - aspect: 1.0 1.0; - aspect_preference: VERTICAL; - rel1 { - relative: 1.0 0.0; - offset: -5 4; - } - rel2 { - relative: 1.0 1.0; - offset: -5 -5; - } - } - } - part { name: "elm.text"; - clip_to: "disclip"; - type: TEXT; - effect: SOFT_SHADOW; - mouse_events: 0; - scale: 1; description { - state: "default" 0.0; -// min: 16 16; - rel1 { - to_x: "elm.swallow.icon"; - relative: 1.0 0.0; - offset: 0 4; - } - rel2 { - to_x: "elm.swallow.end"; - relative: 0.0 1.0; - offset: -1 -5; - } - color: 0 0 0 255; - color3: 0 0 0 0; - text { - font: "Sans"; - size: 10; -// min: 1 1; - min: 0 1; - align: 0.0 0.5; - text_class: "list_item"; - } - } - description { state: "selected" 0.0; + state: "default" 1.0; inherit: "default" 0.0; - color: 224 224 224 255; - color3: 0 0 0 64; - } - } - part { name: "fg1"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.relative: 1.0 0.5; - rel2.to: "bg"; - image { - normal: "bt_sm_hilight.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "fg2"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.to: "bg"; - image { - normal: "bt_sm_shine.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "disclip"; - type: RECT; - description { state: "default" 0.0; - rel1.to: "bg"; - rel2.to: "bg"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 255 255 255 64; - } - } - } - programs { - // signal: elm,state,%s,active - // a "check" item named %s went active - // signal: elm,state,%s,passive - // a "check" item named %s went passive - // default is passive - program { - name: "go_active"; - signal: "elm,state,selected"; - source: "elm"; - action: STATE_SET "selected" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - } - program { - name: "go_passive"; - signal: "elm,state,unselected"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - transition: LINEAR 0.1; - } - program { - name: "go_disabled"; - signal: "elm,state,disabled"; - source: "elm"; - action: STATE_SET "disabled" 0.0; - target: "disclip"; - } - program { - name: "go_enabled"; - signal: "elm,state,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "disclip"; - } - 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"; - source: "elm"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - set_state(PART:"arrow", "active", vl); - } - } - program { - name: "go_contracted"; - signal: "elm,state,contracted"; - source: "elm"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - set_state(PART:"arrow", "default", vl); - } - } - program { name: "to_rtl"; - signal: "edje,state,rtl"; - source: "edje"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - if (vl == 0.0) { - set_state(PART:"arrow", st, 0.1); - } - } - } - program { name: "to_ltr"; - signal: "edje,state,ltr"; - source: "edje"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - if (vl == 0.1) { - set_state(PART:"arrow", st, 0.0); - } - } - } - } - } - group { name: "elm/genlist/tree_odd/default/default"; - data.item: "stacking" "below"; - data.item: "selectraise" "on"; - data.item: "labels" "elm.text"; - data.item: "icons" "elm.swallow.icon elm.swallow.end"; - data.item: "treesize" "20"; -// data.item: "states" ""; - images { - image: "bt_sm_base1.png" COMP; - image: "bt_sm_shine.png" COMP; - image: "bt_sm_hilight.png" COMP; - image: "ilist_2.png" COMP; - image: "icon_arrow_left.png" COMP; - image: "icon_arrow_right.png" COMP; - image: "icon_arrow_down.png" COMP; - } - parts { - part { - name: "event"; - type: RECT; - repeat_events: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } - part { - name: "base"; - mouse_events: 0; - description { - state: "default" 0.0; - image { - normal: "ilist_2.png"; - border: 2 2 2 2; - } - fill.smooth: 0; - } - } - part { name: "bg"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1 { - relative: 0.0 0.0; - offset: -5 -5; - } - rel2 { - relative: 1.0 1.0; - offset: 4 4; - } - image { - normal: "bt_sm_base1.png"; - border: 6 6 6 6; - } - image.middle: SOLID; - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - rel1 { - relative: 0.0 0.0; - offset: -2 -2; - } - rel2 { - relative: 1.0 1.0; - offset: 1 1; - } - } - } - part { name: "elm.swallow.pad"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - relative: 0.0 0.0; - offset: 4 4; - } - rel2 { - relative: 0.0 1.0; - offset: 4 -5; - } - } - } - part { name: "arrow"; - clip_to: "disclip"; - ignore_flags: ON_HOLD; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - aspect: 1.0 1.0; - rel1 { - to_x: "elm.swallow.pad"; - relative: 1.0 0.0; - offset: -1 4; - } - rel2 { - to_x: "elm.swallow.pad"; - relative: 1.0 1.0; - offset: -1 -5; - } - image.normal: "icon_arrow_right.png"; - } - description { state: "default" 0.1; - inherit: "default" 0.0; - image.normal: "icon_arrow_left.png"; - } - description { state: "active" 0.0; - inherit: "default" 0.0; - image.normal: "icon_arrow_down.png"; - } - description { state: "active" 0.1; - inherit: "default" 0.0; - image.normal: "icon_arrow_down.png"; - } - } - part { name: "elm.swallow.icon"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 0.0 0.5; - rel1 { - to_x: "arrow"; - relative: 1.0 0.0; - offset: 4 4; - } - rel2 { - to_x: "arrow"; - relative: 1.0 1.0; - offset: 4 -5; - } - } - } - part { name: "elm.swallow.end"; - clip_to: "disclip"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 1 0; - align: 1.0 0.5; - aspect: 1.0 1.0; - aspect_preference: VERTICAL; - rel1 { - relative: 1.0 0.0; - offset: -5 4; - } - rel2 { - relative: 1.0 1.0; - offset: -5 -5; - } - } - } - part { name: "elm.text"; - clip_to: "disclip"; - type: TEXT; - effect: SOFT_SHADOW; - mouse_events: 0; - scale: 1; - description { - state: "default" 0.0; -// min: 16 16; - rel1 { - to_x: "elm.swallow.icon"; - relative: 1.0 0.0; - offset: 0 4; - } - rel2 { - to_x: "elm.swallow.end"; - relative: 0.0 1.0; - offset: -1 -5; - } - color: 0 0 0 255; - color3: 0 0 0 0; - text { - font: "Sans"; - size: 10; - min: 1 1; -// min: 0 1; - align: -1.0 0.5; - text_class: "list_item"; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - color: 224 224 224 255; - color3: 0 0 0 64; - } - } - part { name: "fg1"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.relative: 1.0 0.5; - rel2.to: "bg"; - image { - normal: "bt_sm_hilight.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "fg2"; - clip_to: "disclip"; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - rel1.to: "bg"; - rel2.to: "bg"; - image { - normal: "bt_sm_shine.png"; - border: 6 6 6 0; - } - } - description { state: "selected" 0.0; - inherit: "default" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { name: "disclip"; - type: RECT; - description { state: "default" 0.0; - rel1.to: "bg"; - rel2.to: "bg"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 255 255 255 64; - } - } - } - programs { - // signal: elm,state,%s,active - // a "check" item named %s went active - // signal: elm,state,%s,passive - // a "check" item named %s went passive - // default is passive - program { - name: "go_active"; - signal: "elm,state,selected"; - source: "elm"; - action: STATE_SET "selected" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - } - program { - name: "go_passive"; - signal: "elm,state,unselected"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "bg"; - target: "fg1"; - target: "fg2"; - target: "elm.text"; - transition: LINEAR 0.1; - } - program { - name: "go_disabled"; - signal: "elm,state,disabled"; - source: "elm"; - action: STATE_SET "disabled" 0.0; - target: "disclip"; - } - program { - name: "go_enabled"; - signal: "elm,state,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "disclip"; - } - 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"; - source: "elm"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - set_state(PART:"arrow", "active", vl); - } - } - program { - name: "go_contracted"; - signal: "elm,state,contracted"; - source: "elm"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - set_state(PART:"arrow", "default", vl); - } - } - program { name: "to_rtl"; - signal: "edje,state,rtl"; - source: "edje"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - if (vl == 0.0) { - set_state(PART:"arrow", st, 0.1); - } - } - } - program { name: "to_ltr"; - signal: "edje,state,ltr"; - source: "edje"; - script { - new st[31]; - new Float:vl; - get_state(PART:"arrow", st, 30, vl); - if (vl == 0.1) { - set_state(PART:"arrow", st, 0.0); - } - } - } - } - } - group { name: "elm/genlist/tree_compress_odd/default/default"; - data.item: "stacking" "below"; - data.item: "selectraise" "on"; - data.item: "labels" "elm.text"; - data.item: "icons" "elm.swallow.icon elm.swallow.end"; - data.item: "treesize" "20"; -// data.item: "states" ""; - images { - image: "bt_sm_base1.png" COMP; - image: "bt_sm_shine.png" COMP; - image: "bt_sm_hilight.png" COMP; - image: "ilist_2.png" COMP; - image: "icon_arrow_left.png" COMP; - image: "icon_arrow_right.png" COMP; - image: "icon_arrow_down.png" COMP; - } - parts { - part { - name: "event"; - type: RECT; - repeat_events: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } - part { - name: "base"; - mouse_events: 0; - description { - state: "default" 0.0; - image { - normal: "ilist_2.png"; - border: 2 2 2 2; - } - fill.smooth: 0; + image.normal: "ilist_2.png"; } } part { name: "bg"; @@ -18866,6 +17566,22 @@ collections { // signal: elm,state,%s,passive // a "check" item named %s went passive // default is passive + program { + name: "odd"; + signal: "elm,state,odd"; + source: "elm"; + action: STATE_SET "default" 1.0; + target: "base_sh"; + target: "base"; + } + program { + name: "even"; + signal: "elm,state,even"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "base_sh"; + target: "base"; + } program { name: "go_active"; signal: "elm,state,selected"; @@ -18955,7 +17671,6 @@ collections { } } } - group { name: "elm/genlist/item/default_style/default"; styles { diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index 0d52714c35..7e8cd282c5 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -393,6 +393,8 @@ struct _Elm_Genlist_Item Eina_Bool dragging : 1; Eina_Bool updateme : 1; Eina_Bool nocache : 1; + Eina_Bool stacking_even : 1; + Eina_Bool nostacking : 1; }; struct _Item_Cache @@ -404,7 +406,6 @@ struct _Item_Cache const char *item_style; // it->itc->item_style Eina_Bool tree : 1; // it->flags & ELM_GENLIST_ITEM_SUBITEMS Eina_Bool compress : 1; // it->wd->compress - Eina_Bool odd : 1; // in & 0x1 Eina_Bool selected : 1; // it->selected Eina_Bool disabled : 1; // it->disabled @@ -555,7 +556,7 @@ _event_hook(Evas_Object *obj, (!strcmp(ev->keyname, "space"))) && (!wd->multi) && (wd->selected)) { - Elm_Genlist_Item *it = elm_genlist_selected_item_get(obj); + it = elm_genlist_selected_item_get(obj); elm_genlist_item_expanded_set(it, !elm_genlist_item_expanded_get(it)); } @@ -992,10 +993,10 @@ _item_unselect(Elm_Genlist_Item *it) edje_object_signal_emit(it->base.view, "elm,state,unselected", "elm"); stacking = edje_object_data_get(it->base.view, "stacking"); selectraise = edje_object_data_get(it->base.view, "selectraise"); - if ((selectraise) && (!strcmp(selectraise, "on"))) + if (!it->nostacking) { - if ((stacking) && (!strcmp(stacking, "below"))) - evas_object_lower(it->base.view); + if ((it->order_num_in & 0x1) ^ it->stacking_even) evas_object_lower(it->base.view); + else evas_object_raise(it->base.view); } it->highlighted = EINA_FALSE; if (it->selected) @@ -1580,7 +1581,6 @@ _item_cache_add(Elm_Genlist_Item *it) itc->item_style = eina_stringshare_add(it->itc->item_style); if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) itc->tree = 1; itc->compress = (it->wd->compress); - itc->odd = (it->order_num_in & 0x1); itc->selected = it->selected; itc->disabled = it->disabled; itc->expanded = it->expanded; @@ -1622,16 +1622,14 @@ static Item_Cache * _item_cache_find(Elm_Genlist_Item *it) { Item_Cache *itc; - Eina_Bool tree = 0, odd; + Eina_Bool tree = 0; if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) tree = 1; - odd = (it->order_num_in & 0x1); EINA_INLIST_FOREACH(it->wd->item_cache, itc) { if ((itc->selected) || (itc->disabled) || (itc->expanded)) continue; if ((itc->tree == tree) && - (itc->odd == odd) && (itc->compress == it->wd->compress) && (!strcmp(it->itc->item_style, itc->item_style))) { @@ -1644,6 +1642,61 @@ _item_cache_find(Elm_Genlist_Item *it) return NULL; } +static void +_elm_genlist_item_odd_even_update(Elm_Genlist_Item *it) +{ + if (!it->nostacking) + { + if ((it->order_num_in & 0x1) ^ it->stacking_even) + evas_object_lower(it->base.view); + else + evas_object_raise(it->base.view); + } + + if (it->order_num_in & 0x1) + edje_object_signal_emit(it->base.view, "elm,state,odd", "elm"); + else + edje_object_signal_emit(it->base.view, "elm,state,even", "elm"); +} + +static void +_elm_genlist_item_state_update(Elm_Genlist_Item *it, Item_Cache *itc) +{ + if (itc) + { + if (it->selected != itc->selected) + { + if (it->selected) + edje_object_signal_emit(it->base.view, + "elm,state,selected", "elm"); + } + if (it->disabled != itc->disabled) + { + if (it->disabled) + edje_object_signal_emit(it->base.view, + "elm,state,disabled", "elm"); + } + if (it->expanded != itc->expanded) + { + if (it->expanded) + edje_object_signal_emit(it->base.view, + "elm,state,expanded", "elm"); + } + } + else + { + if (it->selected) + edje_object_signal_emit(it->base.view, + "elm,state,selected", "elm"); + if (it->disabled) + edje_object_signal_emit(it->base.view, + "elm,state,disabled", "elm"); + if (it->expanded) + edje_object_signal_emit(it->base.view, + "elm,state,expanded", "elm"); + } +} + static void _item_cache_free(Item_Cache *itc) { @@ -1659,13 +1712,22 @@ _item_realize(Elm_Genlist_Item *it, Eina_Bool calc) { Elm_Genlist_Item *it2; - const char *stacking; const char *treesize; char buf[1024]; int depth, tsize = 20; Item_Cache *itc = NULL; - if ((it->realized) || (it->delete_me)) return; + if (it->delete_me) return ; + if (it->realized) + { + if (it->order_num_in != in) + { + it->order_num_in = in; + _elm_genlist_item_odd_even_update(it); + _elm_genlist_item_state_update(it, NULL); + } + return; + } it->order_num_in = in; if (it->nocache) @@ -1681,6 +1743,9 @@ _item_realize(Elm_Genlist_Item *it, } else { + const char *stacking_even; + const char *stacking; + it->base.view = edje_object_add(evas_object_evas_get(it->base.widget)); edje_object_scale_set(it->base.view, elm_widget_scale_get(it->base.widget) * @@ -1694,12 +1759,20 @@ _item_realize(Elm_Genlist_Item *it, if (it->wd->compress) strncat(buf, "_compress", sizeof(buf) - strlen(buf)); - if (in & 0x1) strncat(buf, "_odd", sizeof(buf) - strlen(buf)); strncat(buf, "/", sizeof(buf) - strlen(buf)); strncat(buf, it->itc->item_style, sizeof(buf) - strlen(buf)); _elm_theme_object_set(it->base.widget, it->base.view, "genlist", buf, elm_widget_style_get(it->base.widget)); + + stacking_even = edje_object_data_get(it->base.view, "stacking_even"); + if (!stacking_even) stacking_even = "above"; + it->stacking_even = !!strcmp("above", stacking_even); + + stacking = edje_object_data_get(it->base.view, "stacking"); + if (!stacking) stacking = "yes"; + it->nostacking = !!strcmp("yes", stacking); + edje_object_mirrored_set(it->base.view, elm_widget_mirrored_get(it->base.widget)); it->spacer = @@ -1707,6 +1780,9 @@ _item_realize(Elm_Genlist_Item *it, evas_object_color_set(it->spacer, 0, 0, 0, 0); elm_widget_sub_object_add(it->base.widget, it->spacer); } + + _elm_genlist_item_odd_even_update(it); + for (it2 = it, depth = 0; it2->parent; it2 = it2->parent) { if (it2->parent->flags != ELM_GENLIST_ITEM_GROUP) depth += 1; @@ -1726,13 +1802,6 @@ _item_realize(Elm_Genlist_Item *it, "elm", _signal_expand, it); edje_object_signal_callback_add(it->base.view, "elm,action,contract", "elm", _signal_contract, it); - stacking = edje_object_data_get(it->base.view, "stacking"); - if (stacking) - { - if (!strcmp(stacking, "below")) evas_object_lower(it->base.view); - else if (!strcmp(stacking, "above")) - evas_object_raise(it->base.view); - } evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, it); evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_UP, @@ -1745,39 +1814,8 @@ _item_realize(Elm_Genlist_Item *it, _multi_up, it); evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MULTI_MOVE, _multi_move, it); - if (itc) - { - if (it->selected != itc->selected) - { - if (it->selected) - edje_object_signal_emit(it->base.view, - "elm,state,selected", "elm"); - } - if (it->disabled != itc->disabled) - { - if (it->disabled) - edje_object_signal_emit(it->base.view, - "elm,state,disabled", "elm"); - } - if (it->expanded != itc->expanded) - { - if (it->expanded) - edje_object_signal_emit(it->base.view, - "elm,state,expanded", "elm"); - } - } - else - { - if (it->selected) - edje_object_signal_emit(it->base.view, - "elm,state,selected", "elm"); - if (it->disabled) - edje_object_signal_emit(it->base.view, - "elm,state,disabled", "elm"); - if (it->expanded) - edje_object_signal_emit(it->base.view, - "elm,state,expanded", "elm"); - } + + _elm_genlist_item_state_update(it, itc); } if ((calc) && (it->wd->homogeneous) && ((it->wd->item_width) || ((it->wd->item_width) && (it->wd->group_item_width))))