Commit Graph

325 Commits

Author SHA1 Message Date
nirajkr 495fe1462c gengrid : Fix the issue to skip disable item in item select
Summary:
Fix to skip the item which is disabled and select the next item to the
         disabled item
         @fix

Reviewers: seoz, raster

CC: seoz, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D700
2014-05-14 20:50:11 +09:00
Daniel Juyung Seo a64e8eed91 focus: update the focus in_theme status on each item's focus set.
As widget and widget item can have different in_theme value (since
 30cada369), we need to update in_theme value whenever the widget or
widget item get the focus.

Applied this logic to genlist, gengrid, toolbar first.
List focus is not working well at the moment.

This fixes small focus highlight on the left top corner of genlist
when the genlist scroller is clicked before the genlist is focused.

Special thanks to zmike for the report.
2014-05-12 01:25:43 +09:00
Daniel Juyung Seo 45e8b4c82e focus: Change new API names related to focus auto scrolling.
elm_config_focus_auto_scroll_bring_in_enabled_get/set()
 ->
elm_config_focus_autoscroll_mode_get/set()

The main reason is that bring_in_enabled_get/set() APIs are too restricted
and thus not flexible. I got more requirements for the focus autoscrolling
such as none, wholely visible not just bring_in and show. So it is correct
to add mode_set/get() APIs for the focus auto scrolling.

Thanks god, we've found this before the release :)

@feature
2014-05-11 22:46:16 +09:00
Daniel Juyung Seo 4f8614e866 Revert "remove all scrolling changes for focused items."
This reverts commit 377179bdaf84aa1a86621cdfa64ed43613ab9d45.

The main claim of https://phab.enlightenment.org/T1205 was fixed in
the previous commit 30cada369. This code will be modifed again in the
next commit due to the api change during development life cycle.

Note: do not blindly revert this commit if you have any problem with
widget item focus. This commit is not related to any fundamental cause
of the issues. If you have a problem, please contact me first.

seojuyung2@gmail.com or SeoZ on IRC.

Thanks.
2014-05-11 22:42:15 +09:00
Daniel Juyung Seo dfead75366 gengrid/genlist/list/toolbar: Do not set the focus to the item on widget's first focus.
This was introduced during 1.10 development phase but this changed the
default focus behavior and got a lot of complaints. (especially from
discomfitor)

So I would like to comment this out now and make it optional on 1.11
by keeping the default behavior.
2014-05-11 21:21:51 +09:00
Daniel Juyung Seo 8ffbf246f4 elm: fixed trivial formattings.
Just found them while reading codes.
2014-05-10 23:44:27 +09:00
Daniel Juyung Seo 45f7f881e8 gengrid: removed build warning. 2014-05-10 01:12:20 +09:00
Anil Kumar Nahak 9d1813f7ee genlist/gengrid: Use pan object geometry for focus highlight calculation
Summary: Genlist/gengrid object geometry was used before this patch but using the pan object geometry is more correct. This can be reproduced when the size of "elm.swallow.content" part is smaller then the size of scroller object, focus animtaion on items is jerky.

Reviewers: raster, seoz, singh.amitesh

CC: nirajkr

Differential Revision: https://phab.enlightenment.org/D818
2014-05-10 01:07:58 +09:00
zmike fe4fae4954 Revert "Revert "focus: Removed unused parameter from an internal focus function.""
This reverts commit b8549f3e83a8592145a50085182583adead2c74e.

this build system is bad and whoever did the eo integration should not feel pleased with themselves.
2014-05-07 01:13:19 -04:00
zmike 54eabd94e2 Revert "focus: Removed unused parameter from an internal focus function."
This reverts commit 5832b692aa5f68a2924bd7886390d489eb13aefb.

broke build
2014-05-07 01:08:04 -04:00
zmike be636e58be remove all scrolling changes for focused items.
this.is.BROOOOOOOOOOOOOOOKEEEEEEEEEEEEEEEEEEENNNNNNNNNNNNNNNNNNNNNNNNNNNNN.

SERIOUSLY.

you cannot go scrolling all over the place in every widget that has a scroller just because the widget gets focus. what user wants that? no user anywhere, under any circumstances, ever, in all of history.

if you dare to put this back in, I will continue to remove it for the rest of eternity until it never, ever scrolls in any unwanted case. the focused item doesn't have to always be in the viewport, and should never be moved into the viewport [[[[[[[ except to maintain an already-existing position inside the viewport ]]]]]]]

too much of my time wasted on this stupid "feature" which should have been MUCH more thoroughly tested and reviewed before it was merged.

T1205 STILL NOT FIXED
2014-05-07 01:06:30 -04:00
Daniel Juyung Seo d0380e3342 focus: Removed unused parameter from an internal focus function.
is_next parameter is not used for
elm_widget_focus_highlight_geometry_get() function.
But this parameter was not cleaned up in the commit 5320cca.
2014-05-07 00:05:07 +09:00
Amitesh Singh 24a4e9e67c gengrid: frame variable should be used for position changes.
Summary:
Earlier pos was getting used for the item coordinates. To support other Ecore_Pos_Map variations, frame variable should be used.
@fix

Test Plan:
elementary_test-> "Gengrid Focus". Enable reorder mode and use keys to move
the focused item.

Reviewers: raster, seoz

Reviewed By: seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D811
2014-04-30 17:59:40 +09:00
Daniel Juyung Seo 535fe6bd97 gengrid: Added elm_gengrid_wheel_disabled_set/get() APIs.
Summary:
The basic idea is from Abhinandan Aryadipta and I implemented this in
upstream.
Special thanks to JackDanielZ for eolian madness.

@feature

Reviewers: JackDanielZ

Differential Revision: https://phab.enlightenment.org/D803
2014-04-27 13:54:37 +09:00
Daniel Juyung Seo 4df87d5959 gengrid: removed unnecessary return value check.
Just return the return value without checking it.
2014-04-27 13:42:48 +09:00
Amitesh Singh 31fd782ab0 gengrid: Implemented item_select_on_focus feature.
Summary:
This is based on bb1e8afd.
@feature

Test Plan: elementary_test->"Gengrid Focus"

Reviewers: seoz, raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D702
2014-04-27 13:08:15 +09:00
Amitesh Singh 8e0ffb8332 config: Added two APIs to enable/disable focus auto scroll bring in feature.
Summary:
 Summary:
    - APIs
      - elm_config_focus_auto_scroll_bring_in_enabled_set
      - elm_config_focus_auto_scroll_bring_in_enabled_get
    - list/genlist/toolbar/gengrid: Using this feature for scrolling for focus movement.
    - Added test case in "List Focus", "Genlist Focus", "Toolbar Focus" and "Gengrid Focus"

    @feature

Test Plan: elementary_test->"List Focus", "Genlist Focus", "Toolbar Focus" & "Gengrid Focus".

Reviewers: raster, seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D799
2014-04-27 04:15:26 +09:00
Amitesh Singh 112d481dca gengrid: ignore key events if item reorder is going on.
Summary: This was missed in 43eb52e159.

Test Plan:
elementary_test->"Gengrid Focus" and enable "reorder mode" by clicking "redorder mode enable" checkbox.
Move the items by direction keys.

Reviewers: raster, seoz

Reviewed By: seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D801
2014-04-27 03:17:02 +09:00
Daniel Juyung Seo 4d1d80481f gengrid: Changed internal variables to fix shadow variable build warnings.
elm_gengrid.c: In function '_item_move_cb':
elm_gengrid.c:2084:19: warning: declaration of 'y1' shadows a global
declaration [-Wshadow]
elm_gengrid.c: In function '_swap_items':
elm_gengrid.c:2136:19: warning: declaration of 'y1' shadows a global
declaration [-Wshadow]
2014-04-27 00:45:24 +09:00
Carsten Haitzler c196a72a31 formatting - space++ 2014-04-23 21:21:07 +09:00
Amitesh Singh f3ad4cd3c4 gengrid: item moving feature with keys.
Summary:
- Added two APIs elm_gengrid_reorder_mode_start/stop
- Add two smart callbacks
  - "item,reorder,anim,start" - This is called when a gengrid item movement
     has just started by keys in reorder mode.
  - "item,reorder,anim,stop" - This is called when a gengrid item movement just
     stopped in reorder mode.

@feature

Test Plan: elementary_test->Gengrid Focus

Reviewers: raster, seoz, SanghyeonLee

CC: seoz

Differential Revision: https://phab.enlightenment.org/D723
2014-04-23 21:13:57 +09:00
Daniel Juyung Seo b173ed7c85 genlist/gengrid/list: Fix first on_focus call correctly by checking focus highlight.
First on_focus call should consider focus highlight enable status and
do the different job according to that.

This can be tested in "genlist 7" and "genlist focus" examples in
elementary_test.
2014-04-22 23:18:04 +09:00
Carsten Haitzler 9d55fab418 entry: wrong viewport value calculation issue fix
Summary:
Issue: As entire scroller edje co-ordinates was being taken instead of the actual viewport value,
if in scroller edje more parts are added apart from just "elm.swallow.content", then the viewport value
set will be wrong. hence the selection handlers will not hide when they have to hide.

solution: Instead of taking scroller edje's geometry, get the actual viewport values.
To get viewport x,y a new scrollable interface is also added.

signed-off by: Shilpa Singh <shilpa.singh@samsung.com>

@fix

Test Plan: Selection handlers have to hide correctly when the text is scrolled in a scrolled entry, if the scroller edc of entry has more parts added other than elm.swallow.content, then when we scroll the selection handlers are not hidden correctly.

Reviewers: jaehwan, woohyun, seoz, Hermet, raster

CC: govi, rajeshps, thiepha

Differential Revision: https://phab.enlightenment.org/D674
2014-04-21 12:31:49 +09:00
Jaeun Choi 8b8a4b6922 gengrid: apply key binidng
Summary: This patch applies key binding to elm_gengrid.

Test Plan: None

Reviewers: Hermet, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D744
2014-04-16 17:29:16 +09:00
ChunEon Park 5ab6a7739f widgets - don't handle the events(key,mouse) if the object is disabled.
we can prevent to handle the widget events from the widget infra,
if the object is disabled.

conceptually, disabled object should not be interacted to user input(key, mouse)
2014-04-16 10:59:43 +09:00
Tom Hacohen e8d0f9bb14 gengrid: Adjusted to Eo2. 2014-04-10 09:35:00 +01:00
Daniel Juyung Seo 04205fd513 gengrid: Fixed wrong formatting. 2014-04-05 01:18:26 +09:00
Amitesh Singh 1479664ec0 list/genlist/gengrid/toolbar: Fix - _nearest_visible_item_get() should always return an item.
Test Plan:
Bug:
- elementary_test->genlist/list/toolbar/gengrid Focus
- Resize the window to a state when no item is fully visible. only partially visible.
- Move Focus from outer widgets (Up/Down/Left/right buttons) to list/genlist/gengrid/toolbar.
- Focus goes away (size - 0). Reason: _nearest_visible_item_get returns NULL.

@fix

Reviewers: seoz, raster, woohyun

Reviewed By: raster

CC: seoz, nirajkr, anand.km

Differential Revision: https://phab.enlightenment.org/D696
2014-04-04 12:04:04 +09:00
Amitesh Singh 13d69bcd9d Gengrid: fix segv in _elm_gengrid_item_edge_check.
Reviewers: raster, seoz

Reviewed By: raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D695
2014-04-03 21:06:36 +09:00
nirajkr 5fca06cdb7 gengrid: Fixed the focus animation in horizontal mode
Summary:
Fixed the focus animation in horizontal mode. Earlier focus was moving
         out of the view port in horizontal mode
         @fix

Reviewers: seoz, raster

CC: seoz, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D693
2014-04-03 19:19:45 +09:00
Amitesh Singh d28e8010b7 gengrid: Added feature to move focus out of gengrid if focus is on edge items.
Summary:
Earlier, Focus can only move out of gengrid from first or last item.
Now, Focus can move out of gengrid if focus is on edge items.
@feature

Test Plan: elementary_test->Gengrid Focus

Reviewers: raster, seoz

CC: seoz, nirajkr

Differential Revision: https://phab.enlightenment.org/D682
2014-04-03 18:31:47 +09:00
Daniel Zaoui fd0d159fef Eolian: Integration of Gengrid and Gengrid Pan 2014-04-01 14:52:14 +03:00
Amitesh Singh a090a1cc1f gengrid: Added focus movement on widget items by mouse in.
Summary:
- Added a test case in "Gengrid Focus".
@feature

Test Plan: elementary_test->Gengrid Focus

Reviewers: raster, cedric, woohyun

Reviewed By: raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D664
2014-04-01 20:26:13 +09:00
Carsten Haitzler 2291c37875 Revert "adding focus direction for gengrid"
This reverts commit 4fe82cc740eda0c6b50ee09aedcf173aac1e775d.
2014-03-24 18:02:03 +09:00
m.zielonka 32751ac33b adding focus direction for gengrid
Summary:
It is implementation of focus_direction method for gengrid widget.

We need it in our project. We must service focus by
directions and we want to use gengrid widget. Additionally we must
support changing focus by keyboard (TV remote).
Unfortunately gengrid hasn't default implementation to present its
sub-objects as candidates for focus direction.

Our solution can search for focusable sub-objects (from realized items)
and change then focused and last selected variables in gengrid. If this
candidate wins then object will receive focus.

Reviewers: cedric, raster

CC: raster, seoz

Differential Revision: https://phab.enlightenment.org/D449
2014-03-24 16:38:27 +09:00
Daniel Juyung Seo 4f29cd1d32 gengrid: Check disabled status of an item in nearest visible item. 2014-03-24 02:10:59 +09:00
Daniel Juyung Seo 7f0f50fbc6 list/genlist/gengrid: Internal refactoring of item_focused/unfocused
codes.

- Added a check for focus highlight enable status before calling focus
signal to edje.
- Used obj instead of WIDGET(it) because that is used many times.
2014-03-23 23:29:16 +09:00
Daniel Juyung Seo 8fa5dad5f9 gengrid: Fixed annoying gengrid scrolling issue when focus is back to gengrid.
This patch is a gengrid version of genlist patch cc827fef6.

Now, gengrid does not autoscroll to last focused/selected item when the gengrid
is focused. It tries to find the nearest visible item instead of the
last focused/selected item.
2014-03-23 21:37:55 +09:00
Daniel Juyung Seo fad3a2dfc4 list/genlist/gengrid: Handle on_focus event on focus set only for key
event.

When you use mouse(touch) that triggers mouse up event, the
focus/selection movement is done by mouse up callback, so don't need to
handle on_focus event when mouse(touch) is used.

You can reproduce the bug by the following step.
1. launch elementary_test -> list focus, genlist focus, gengrid focus
2. focus an item (by touch, by key)
3. move focus to left button (by touch, by key)
4. click an another item (by touch)
5. previously focused item will be unfocused again even it was unfocused
at step #3/

Special thanks to Amitesh for the report.
2014-03-23 16:48:10 +09:00
Daniel Juyung Seo 0008452aba gengrid: Commented out some temporarily unused code.
This code will be used later when the item selection on key press becomes
optional. So do not remove this.
2014-03-23 02:07:20 +09:00
Daniel Juyung Seo 3aef035f1d gengrid: Fixed broken gengrid item focus support.
This commit is a gengrid version of 7d43205a0.
Now it works so much better than before.
- Fixed the separate behavior between selected item and focused item.
- Fixed wrong focus set when gengrid is focused first time by mouse.
- Fixed wrong scroll movement when the focus highlight is disabled.
- Item selection sets that item focused. So when an item is selected, do
not need to set the focus again.
2014-03-22 23:51:52 +09:00
Daniel Juyung Seo 27f98b1e01 genlist/gengrid: Used item callback infrastructure. 2014-03-22 19:10:27 +09:00
Daniel Juyung Seo 65c948ca93 list/genlist/gengrid: Call item_show not bring_in on focus.
Elm 1.9 does item_show not bring_in so let's keep the consistency. I
will make this optional later.
2014-03-22 18:38:00 +09:00
nirajkr fcfeba5097 gengrid : Implementation for gengrid item focus support
Summary:
Implemented the following API to support gengrid item_focus
          1. _elm_gengrid_focus_highlight_geometry_get
          2. _elm_gengrid_focused_item_get
          3. _item_focus_up
          4. _item_focus_down
          5. _item_focus_right
          6. _item_focus_down
          7. _item_focus_set_hook
          8. _item_focus_get_hook
          9. _item_focused
          10. _item_unfocused
          11. Changes in the smart_event, pan_calculation, smart_on_focus to support item focus

Reviewers: seoz, woohyun, singh.amitesh, raster

CC: raster

Differential Revision: https://phab.enlightenment.org/D550
2014-03-21 17:00:46 +09:00
Daniel Zaoui 7460467419 Eolian: Integration of Scrollable Interface 2014-03-18 08:14:44 +02:00
Daniel Zaoui e2206a1a22 Eolian: Integration of Elm Widget 2014-03-17 09:03:56 +02:00
zmike c2d994e996 gengrid clear should do nothing if there are no items 2014-03-14 14:15:22 -04:00
Daniel Juyung Seo e60e43f8f5 list/genlist/gengrid: Clear some internal variables when an item is deleted.
Set last_selected_item, last_focused_item, focused_item to NULL when the
item is deleted.
For genlist and gengrid, clear them in del_not_serious.
2014-03-09 02:57:09 +09:00
Jaehwan Kim db23689614 access: Add smart signal "access,changed"
It occurs that access mode is changed.
Application can add this callback for each widget.
2014-02-08 14:05:14 +09:00
WooHyun Jung 0a1179dde4 elm_layout now supports focused/unfocused smart callback
by itself for widgets that inherit layout class.
If it uses elm_widget's, smart callback will be called at the
beginning or smart_on_focus function.
2014-02-06 16:18:57 +09:00