bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2c515628d35c90f6eb25cd3b0816d569a8fc8251
commit 2c515628d35c90f6eb25cd3b0816d569a8fc8251 Author: Wonki Kim <[email protected]> Date: Fri Dec 6 08:29:26 2019 +0000 focus: modify a formula to calculate focus region to show if there was a spacer around elm.swallow.content of scroller, position of pan object would be different with position of the scroller obj. this patch modifies a fomular that calculates some points relative to scroller to a fomular that calculates the points relative to pan obj. Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D10745 --- src/lib/elementary/efl_ui_widget.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 370bf4e045..010c9fa9b6 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -1128,12 +1128,15 @@ elm_widget_focus_region_show(Eo *obj) if (_elm_scrollable_is(o) && !elm_widget_disabled_get(o)) { Evas_Coord sx, sy; + Evas_Coord vx, vy; + elm_interface_scrollable_content_region_get(o, &sx, &sy, NULL, NULL); + elm_interface_scrollable_content_viewport_geometry_get(o, &vx, &vy, NULL, NULL); - // Get the object's on_focus_region position relative to the scroller. + // Get the object's on_focus_region position relative to the pan in the scroller. Evas_Coord rx, ry; - rx = ox + r.x - px + sx; - ry = oy + r.y - py + sy; + rx = ox + r.x - vx + sx; + ry = oy + r.y - vy + sy; switch (_elm_config->focus_autoscroll_mode) { --
