rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=5a59edb306f78b409885e57ab921e2dc1c0e7bf7
commit 5a59edb306f78b409885e57ab921e2dc1c0e7bf7 Author: Vyacheslav Reutskiy <v.reuts...@samsung.com> Date: Thu Feb 4 15:09:04 2016 +0200 genlist.edc: naming item styles correctly Change genlist item styles accourdngly to group content. This is synchronize the Eflete theme with the Elementary namespace. Change-Id: Iefe42c19f319064c4c575fb94e712e2861b3087b --- data/themes/default/widgets/genlist.edc | 315 ++++++++++++++++++++++++++++++-- src/bin/ui/project_navigator.c | 4 +- src/bin/ui/style_manager.c | 2 +- 3 files changed, 298 insertions(+), 23 deletions(-) diff --git a/data/themes/default/widgets/genlist.edc b/data/themes/default/widgets/genlist.edc index 18cb39a..5c80de2 100644 --- a/data/themes/default/widgets/genlist.edc +++ b/data/themes/default/widgets/genlist.edc @@ -50,21 +50,12 @@ group { name: "elm/genlist/item/default/default"; visible: 0; } } - part { name: "elm.swallow.icon"; + part { name: "elm.swallow.pad"; type: SWALLOW; - repeat_events: 1; description { state: "default" 0.0; align: 0.0 0.5; - min: 14 14; - max: 14 14; - aspect: 1.0 1.0; - aspect_preference: VERTICAL; - rel1 { - offset: 6 3; - } rel2 { relative: 0.0 1.0; - offset: -1 -4; } } description { state: "hide" 0.0; @@ -72,17 +63,23 @@ group { name: "elm/genlist/item/default/default"; visible: 0; } } - part { name: "elm.swallow.pad"; + part { name: "elm.swallow.icon"; type: SWALLOW; + repeat_events: 1; description { state: "default" 0.0; align: 0.0 0.5; + min: 14 14; + max: 14 14; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; rel1 { + to_x: "elm.swallow.pad"; relative: 1.0 0.0; - offset: 6 0; - to_x: "elm.swallow.icon"; + offset: 6 3; } rel2 { - to_x: "elm.swallow.icon"; + relative: 0.0 1.0; + offset: -1 -4; } } description { state: "hide" 0.0; @@ -98,7 +95,8 @@ group { name: "elm/genlist/item/default/default"; color_class: "main"; rel1 { relative: 1.0 0.0; - to_x: "elm.swallow.pad"; + to_x: "elm.swallow.icon"; + offset: 6 0; } rel2 { relative: 0.0 1.0; @@ -397,6 +395,285 @@ group { name: "elm/genlist/tree/default/default"; aspect: 1.0 1.0; aspect_preference: VERTICAL; rel1 { + relative: 1.0 0.0; + offset: 6 3; + to_x: "arrow"; + } + rel2 { + to_x: "arrow"; + relative: 0.0 1.0; + offset: -1 -4; + } + } + description { state: "hide" 0.0; + inherit: "default"; + visible: 0; + } + } + part { name: "elm.swallow.pad"; + type: SWALLOW; + description { state: "default" 0.0; + align: 0.0 0.5; + rel2 { + relative: 0.0 1.0; + } + } + description { state: "hide" 0.0; + inherit: "default"; + visible: 0; + } + } + part { name: "elm.text"; + type: TEXT; + repeat_events: 1; + description { state: "default" 0.0; + min: 0 26; + color_class: "main"; + rel1 { + relative: 1.0 0.0; + offset: 6 0; + to_x: "elm.swallow.icon"; + } + rel2 { + relative: 0.0 1.0; + offset: -7 -1; + to_x: "elm.swallow.penult"; + } + text { + font: "PT"; + size: 12; + align: 0.0 0.5; + } + } + description { state: "hide" 0.0; + inherit: "default"; + visible: 0; + } + } + part { name: "elm.swallow.penult"; + type: SWALLOW; + repeat_events: 0; + description { state: "default" 0.0; + align: 1.0 0.5; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + rel1 { + offset: 0 3; + } + rel2 { + relative: 0.0 1.0; + offset: -7 -4; + to_x: "elm.swallow.end"; + } + } + } + part { name: "elm.swallow.end"; + type: SWALLOW; + repeat_events: 0; + description { state: "default" 0.0; + align: 1.0 0.5; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + rel1 { + relative: 1.0 0.0; + offset: 0 3; + } + rel2 { + offset: -7 -4; + } + } + description { state: "hide" 0.0; + inherit: "default"; + visible: 0; + } + } + part { name: "disclip"; + type: RECT; + repeat_events: 0; + description { state: "default" 0.0; + color: 255 255 255 0; + } + description { state: "hide" 0.0; + inherit: "default"; + visible: 0; + } + } + part { name: "arrow"; + type: IMAGE; + description { state: "default" 0.0; + align: 0.0 0.5; + max: 14 14; + color_class: "main"; + rel1 { + relative: 1.0 0.0; + offset: 6 0; + to_x: "elm.swallow.pad"; + } + image { + normal: "icon_arrow_right.png"; + middle: DEFAULT; + } + } + description { state: "hide" 0.0; + inherit: "default"; + visible: 0; + } + description { state: "selected" 0.0; + align: 0.0 0.5; + max: 14 14; + color_class: "main"; + rel1 { + to_x: "elm.swallow.pad"; + offset: 6 0; + relative: 1.0 0.0; + } + image { + normal: "icon_arrow_down.png"; + middle: DEFAULT; + } + } + } + } + programs { + program { name: "selected"; + signal: "elm,state,selected"; + source: "elm"; + action: STATE_SET "selected" 0.00; + target: "bg"; + } + program { name: "unselected"; + signal: "elm,state,unselected"; + source: "elm"; + action: STATE_SET "default" 0.00; + target: "bg"; + } + program { name: "item_hide"; + signal: "elm,state,contract_flip"; + source: "elm"; + action: STATE_SET "hide" 0.00; + target: "separator"; + target: "elm.swallow.icon"; + target: "elm.swallow.pad"; + target: "arrow"; + target: "elm.text"; + target: "elm.swallow.penult"; + target: "elm.swallow.end"; + target: "disclip"; + } + program { name: "unreorder"; + signal: "elm,state,reorder,disable"; + source: "elm"; + action: STATE_SET "selected" 0.00; + target: "bg"; + after: "selected"; + } + program { name: "reorder"; + signal: "elm,state,reorder,enabled"; + source: "elm"; + action: STATE_SET "reordered" 0.00; + target: "bg"; + } + program { name: "unreordered"; + signal: "elm,state,reorder,disabled"; + source: "elm"; + after: "go_active"; + } + program { name: "expanded_sig"; + signal: "mouse,up,1"; + source: "arrow"; + action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; + } + program { name: "arrow_expand"; + signal: "elm,state,expanded"; + source: "elm"; + action: STATE_SET "selected" 0.00; + target: "arrow"; + } + program { name: "arrow_conract"; + signal: "elm,state,contracted"; + source: "elm"; + action: STATE_SET "default" 0.00; + target: "arrow"; + } + program { name: "go_active"; + signal: "elm,state,selected"; + source: "elm"; + action: STATE_SET "selected" 0.00; + target: "bg"; + } + program { name: "go_passive"; + signal: "elm,state,unselected"; + source: "elm"; + action: STATE_SET "default" 0.00; + target: "bg"; + } + program { name: "go_disabled"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.00; + target: "disclip"; + } + program { name: "go_enabled"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.00; + target: "disclip"; + } + } +} + +group { name: "elm/genlist/tree/part/default"; + data { + item: "texts" "elm.text"; + item: "treesize" "20"; + item: "contents" "elm.swallow.icon elm.swallow.end elm.swallow.penult"; + item: "stacking" "above"; + item: "selectraise" "on"; + } + parts { + part { name: "bg"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + rel2 { + offset: -1 -2; + } + } + description { state: "selected" 0.0; + color_class: "select"; + rel2 { + offset: -1 -2; + } + } + description { state: "reorder" 0.0; + color_class: "select"; + rel2 { + offset: -1 -2; + } + } + } + part { name: "separator"; + type: RECT; + description { state: "default" 0.0; + align: 0.5 1.0; + min: 0 1; + max: -1 1; + color: 68 68 68 255; + } + description { state: "hide" 0.0; + inherit: "default"; + visible: 0; + } + } + part { name: "elm.swallow.icon"; + type: SWALLOW; + repeat_events: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + min: 14 14; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + rel1 { offset: 6 3; } rel2 { @@ -626,10 +903,6 @@ group { name: "elm/genlist/tree/default/default"; } } -group { name: "elm/genlist/tree/part/default"; - inherit: "elm/genlist/tree/default/default"; -} - group { name: "elm/genlist/tree/part_selected/default"; inherit: "elm/genlist/tree/part/default"; parts { @@ -697,7 +970,7 @@ group { name: "elm/genlist/item/signal/default"; } group { name: "elm/genlist/tree/item/default"; - inherit: "elm/genlist/tree/default/default"; + inherit: "elm/genlist/tree/part/default"; data.item: "texts" "elm.text elm.text.end"; parts { @@ -744,6 +1017,7 @@ group { name: "elm/genlist/tree/item/default"; } } +/* group { name: "elm/genlist/tree/navigator/default"; inherit: "elm/genlist/tree/default/default"; parts { @@ -782,6 +1056,7 @@ group { name: "elm/genlist/tree/navigator/default"; } } } +*/ group { name: "elm/genlist/item/navigator/default"; inherit: "elm/genlist/item/default/default"; diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c index 529fd6b..a78e992 100644 --- a/src/bin/ui/project_navigator.c +++ b/src/bin/ui/project_navigator.c @@ -624,14 +624,14 @@ project_navigator_add(void) assert(ap.win != NULL); project_navigator.itc_folder = elm_genlist_item_class_new(); - project_navigator.itc_folder->item_style = "navigator"; + project_navigator.itc_folder->item_style = "default"; project_navigator.itc_folder->func.text_get = _folder_item_label_get; project_navigator.itc_folder->func.content_get = _folder_item_icon_get; project_navigator.itc_folder->func.state_get = NULL; project_navigator.itc_folder->func.del = _folder_item_del; project_navigator.itc_group = elm_genlist_item_class_new(); - project_navigator.itc_group->item_style = "navigator"; + project_navigator.itc_group->item_style = "default"; project_navigator.itc_group->func.text_get = _group_item_label_get; project_navigator.itc_group->func.content_get = _group_item_icon_get; project_navigator.itc_group->func.state_get = NULL; diff --git a/src/bin/ui/style_manager.c b/src/bin/ui/style_manager.c index 7c1c06f..7ab0d3d 100644 --- a/src/bin/ui/style_manager.c +++ b/src/bin/ui/style_manager.c @@ -806,7 +806,7 @@ _form_right_side(Style_Editor *style_edit) if (!_itc_style) { _itc_style = elm_genlist_item_class_new(); - _itc_style->item_style = "navigator"; + _itc_style->item_style = "default"; _itc_style->func.text_get = _item_style_label_get; _itc_style->func.content_get = NULL; _itc_style->func.state_get = NULL; --