From 0a0991cdc830f8654efa8df83089297ea77aa7f9 Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Mon, 2 Feb 2015 20:33:45 +0100 Subject: [PATCH] Add support and test for Frame and Separator --- efl/utils/erigo.py | 4 +- examples/elementary/erigo_prj/test_gui.egui | 68 ++++++++++++++++++++- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/efl/utils/erigo.py b/efl/utils/erigo.py index bfb9bfe..25549ad 100644 --- a/efl/utils/erigo.py +++ b/efl/utils/erigo.py @@ -65,6 +65,7 @@ KLASSES = { 'Elm_Check': ('efl.elementary.check', 'Check'), 'Elm_Entry': ('efl.elementary.entry', 'Entry'), 'Elm_Flip': ('efl.elementary.flip', 'Flip'), + 'Elm_Frame': ('efl.elementary.frame', 'Frame'), 'Elm_Genlist': ('efl.elementary.genlist', 'Genlist'), 'Elm_Gengrid': ('efl.elementary.gengrid', 'Gengrid'), 'Elm_Icon': ('efl.elementary.icon', 'Icon'), @@ -73,6 +74,7 @@ KLASSES = { 'Elm_Layout': ('efl.elementary.layout', 'Layout'), 'Elm_Menu': ('efl.elementary.menu', 'Menu'), 'Elm_Radio': ('efl.elementary.radio', 'Radio'), + 'Elm_Separator': ('efl.elementary.separator', 'Separator'), 'Elm_Table': ('efl.elementary.table', 'Table'), 'Elm_Toolbar': ('efl.elementary.toolbar', 'Toolbar'), 'Elm_Win': ('efl.elementary.window', 'Window'), @@ -238,7 +240,7 @@ def _widget_generate(self, name, parent_name=None): child = _widget_generate(self, c_name) w.pack(child, x, y, cspan, rspan) - elif eo_klass_name == 'Elm_Flip': + else: for c_name, (swallow,) in w_data.get('Contains', {}).items(): child = _widget_generate(self, c_name) w.part_content_set(swallow, child) diff --git a/examples/elementary/erigo_prj/test_gui.egui b/examples/elementary/erigo_prj/test_gui.egui index 521dc79..07e490b 100644 --- a/examples/elementary/erigo_prj/test_gui.egui +++ b/examples/elementary/erigo_prj/test_gui.egui @@ -341,13 +341,13 @@ "Evas.Object.visibility":[true], "Evas.Object.size_hint_align":[-1, -1] }, - "Contains":["elm_label2", "elm_button7", "elm_check1", "elm_check2", "elm_radio1", "elm_radio2", "elm_radio3", "elm_actionslider1", "elm_clock1", "elm_entry1"] + "Contains":["elm_frame1", "elm_button7", "elm_separator1", "elm_check1", "elm_check2", "elm_separator2", "elm_radio1", "elm_radio2", "elm_radio3", "elm_separator3", "elm_actionslider1", "elm_clock1", "elm_entry1"] }, "elm_label2": { "Desc": { - "parent":"elm_box2", + "parent":"elm_frame1", "class":"Elm_Label" }, "Properties": @@ -829,6 +829,68 @@ "Evas.Object.size_hint_weight":[1, 1], "Evas.Object.visibility":[true] } + }, + "elm_separator1": + { + "Desc": + { + "parent":"elm_box2", + "class":"Elm_Separator" + }, + "Properties": + { + "Evas.Object.size_hint_weight":[1, 1], + "Evas.Object.visibility":[true], + "Elm_Separator.horizontal":[true] + } + }, + "elm_separator2": + { + "Desc": + { + "parent":"elm_box2", + "class":"Elm_Separator" + }, + "Properties": + { + "Evas.Object.size_hint_weight":[1, 1], + "Evas.Object.visibility":[true], + "Elm_Separator.horizontal":[true] + } + }, + "elm_separator3": + { + "Desc": + { + "parent":"elm_box2", + "class":"Elm_Separator" + }, + "Properties": + { + "Evas.Object.size_hint_weight":[1, 1], + "Evas.Object.visibility":[true], + "Elm_Separator.horizontal":[true] + } + }, + "elm_frame1": + { + "Desc": + { + "parent":"elm_box2", + "class":"Elm_Frame" + }, + "Properties": + { + "Evas.Object.size_hint_weight":[1, 1], + "Evas.Object.visibility":[true], + "Evas.Object.size_hint_align":[-1, 0.50], + "Elm_Widget.part_text":[null, "A collapsable frame"], + "Elm_Frame.autocollapse":[true] + }, + "Contains": + { + "elm_label2":[null] + } } } - } + } \ No newline at end of file