diff options
author | Wonki Kim <wonki_.kim@samsung.com> | 2019-12-06 08:29:26 +0000 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-12-06 15:35:50 +0100 |
commit | 2c515628d35c90f6eb25cd3b0816d569a8fc8251 (patch) | |
tree | 94abc41f7e93922a9e1003fbe42e35ff414c644e | |
parent | 1aa5b0c2e88b417c86c3db7ed69874ae02b79137 (diff) | |
download | efl-2c515628d35c90f6eb25cd3b0816d569a8fc8251.tar.gz |
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 <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10745
-rw-r--r-- | src/lib/elementary/efl_ui_widget.c | 9 |
1 files 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) { |