summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-27 18:34:40 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-02 18:30:22 +0100
commit7033816554497b402cb1d48716955931592be4fa (patch)
treeb0f58eb4cd0220b240a67775ca0d891b8559cfe0
parentacfd031e47735576a4757818d486158d68f4e9a9 (diff)
downloadefl-7033816554497b402cb1d48716955931592be4fa.tar.gz
efl_ui_spotlight: do not inherit from layout anymore
before we inherited from layout, however the theme of the layout was basically just the event part, and the holder part for the indicator. The indicator part is going to be refactored into something else anyways, since the indicator should be useable on other widgets as well. Which means, only the event part is left, which is only used by the scroller spotlight manager, (and now moved there). With the move from this away we are saving round about 0.2KB of pure edje accounting. Additionally, we are saving in perf 4% that is spend in _efl_canvas_layout_efl_gfx_entity_size_set, which also makes this less CPU intensive when resizing (Or even just starting is also enough). ref T7991 Differential Revision: https://phab.enlightenment.org/D10765
-rw-r--r--src/lib/elementary/efl_ui_spotlight_container.c9
-rw-r--r--src/lib/elementary/efl_ui_spotlight_container.eo2
2 files changed, 1 insertions, 10 deletions
diff --git a/src/lib/elementary/efl_ui_spotlight_container.c b/src/lib/elementary/efl_ui_spotlight_container.c
index 44d099a7af..b812501d6b 100644
--- a/src/lib/elementary/efl_ui_spotlight_container.c
+++ b/src/lib/elementary/efl_ui_spotlight_container.c
@@ -191,17 +191,8 @@ _efl_ui_spotlight_container_efl_object_constructor(Eo *obj,
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
- if (!elm_widget_theme_klass_get(obj))
- elm_widget_theme_klass_set(obj, "spotlight");
-
obj = efl_constructor(efl_super(obj, MY_CLASS));
- if (elm_widget_theme_object_set(obj, wd->resize_obj,
- elm_widget_theme_klass_get(obj),
- elm_widget_theme_element_get(obj),
- elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
- CRI("Failed to set layout!");
-
pd->animation_enabled = EINA_TRUE;
pd->position = -1;
pd->curr.page = NULL;
diff --git a/src/lib/elementary/efl_ui_spotlight_container.eo b/src/lib/elementary/efl_ui_spotlight_container.eo
index 16928d7d56..2f462f50d4 100644
--- a/src/lib/elementary/efl_ui_spotlight_container.eo
+++ b/src/lib/elementary/efl_ui_spotlight_container.eo
@@ -4,7 +4,7 @@ struct @beta Efl.Ui.Spotlight.Transition_Event {
to : int; [[The index to where the transition is headed, -1 if not known.]]
}
-class @beta Efl.Ui.Spotlight.Container extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
+class @beta Efl.Ui.Spotlight.Container extends Efl.Ui.Widget implements Efl.Pack_Linear
{
[[The Spotlight widget is a container for other sub-widgets, where only one sub-widget is active at any given time.