#3989 closed task (fixed)
Shell: Use hover and tap/click feedback on all Views
Reported by: | erikos | Owned by: | manuq |
---|---|---|---|
Priority: | Urgent | Milestone: | |
Component: | Sugar | Version: | 0.97.x |
Severity: | Blocker | Keywords: | r+, olpc-test-passed |
Cc: | garycmartin | Distribution/OS: | Unspecified |
Bug Status: | Assigned |
Description
In sugar-0.97.6 a new tap/click and hover feedback landed for the activity icons in the favourites View: light grey bg when hovering and darker grey background when tap/click.
This should be extended to the canvas icons in all the Views (e.g. AP icons, buddy icons...)
Attachments (15)
Change History (33)
Changed 11 years ago by manuq
comment:1 Changed 11 years ago by manuq
- Keywords r? added
The first three patches move the code and style from the shell ActivityIcon to a new toolkit class CanvasIcon. The 4th patch moves many shell icons from EventIcon to CanvasIcon, all except the pulsing icon that is informational.
Now I have to package the CellRendererIcon bits.
comment:2 Changed 11 years ago by manuq
First bits pushed.
comment:3 Changed 11 years ago by manuq
The four patches above went in. Pending: the background stays after the palette pops down in two cases 1. for AP icons in the neighborhood 2. for buddy icon in home view, favorites view.
comment:4 Changed 11 years ago by manuq
The two patches above fix the issues in AP icons and owner icon in the home favorites view.
comment:5 Changed 11 years ago by erikos
- Keywords r+ olpc-test-pending added; r? removed
- Resolution set to fixed
- Status changed from new to closed
Pushed the last two patches as well. Great work!
comment:6 follow-up: ↓ 7 Changed 11 years ago by erikos
- Cc garycmartin added
Visual comment:
I think it would look a bit better if the XO icon had a bit of grey under his head and feet as well. When the feedback is active, it looks a bit squashed.
But I think that is because the icon uses up all the space. Anything we can do here?
comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed 11 years ago by manuq
Replying to erikos:
Visual comment:
I think it would look a bit better if the XO icon had a bit of grey under his head and feet as well. When the feedback is active, it looks a bit squashed.
But I think that is because the icon uses up all the space. Anything we can do here?
Yes it certeanly needs a bit of padding, as we added in the activity icons [1], otherwise looks odd.
[1] http://git.sugarlabs.org/sugar/mainline/commit/c558285618cf6dc2c72d70ca373a4aa69f901325
comment:8 in reply to: ↑ 7 Changed 11 years ago by garycmartin
Replying to manuq:
Replying to erikos:
Visual comment:
I think it would look a bit better if the XO icon had a bit of grey under his head and feet as well. When the feedback is active, it looks a bit squashed.
But I think that is because the icon uses up all the space. Anything we can do here?
Yes it certeanly needs a bit of padding, as we added in the activity icons [1], otherwise looks odd.
Yes +1 to padding, keep in mind we might need to move the Activity icon below the buddy down a little to make room (and worth a quick note that it is currently not showing tap/hover feedback, at least in build 6, though I'd put this as a low priority for now).
[1] http://git.sugarlabs.org/sugar/mainline/commit/c558285618cf6dc2c72d70ca373a4aa69f901325
comment:9 Changed 11 years ago by manuq
- Keywords r? added; r+ removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening, as the cellrenderers in activities list and Journal are still missing.
The following patches add the mouse over feedback for them. I have to figure out how to make the press feedback.
Because cell renderers don't inherit GtkWidget anymore, the styling can't be done using the gtype_name . Instead, it has to be done adding a css class [1] to the style context, and rendering the background in the reimplementation of the do_render method.
For reference, see how GtkCellRendererToggle is implements render [2] and how Baobab app does it [3].
[1] http://developer.gnome.org/gtk3/3.2/GtkStyleContext.html#gtk-style-context-add-class
[2] http://git.gnome.org/browse/gtk+/tree/gtk/gtkcellrenderertoggle.c#n338
[3] http://git.gnome.org/browse/baobab/tree/src/baobab-cellrenderers.vala#n125
comment:10 Changed 11 years ago by manuq
TestCase for the previous:
Go to the Journal or activities list and put the mouse over icons inside the lists.
Another: start a sugar shell (from sugar-build root directory type make shell) and run tests/graphics/cellrenderericon.py in sugar-toolkit-gtk3 component
comment:11 Changed 11 years ago by erikos
Great work Manuel, works really well.
For the button-press/release event I think you have to listen on the tree view. See how we generate our 'clicked' signal in the invoker.
Hope this helps.
comment:12 Changed 11 years ago by erikos
- Priority changed from Unspecified by Maintainer to Urgent
Is important :)
Changed 11 years ago by manuq
New artwork patch (replaces previous) to style prelight and active state of cellrenderer icons.
comment:13 Changed 11 years ago by manuq
Thanks for unblocking me Simon! The two patches above add the active state to the Sugar icons in lists.
comment:14 Changed 11 years ago by manuq
Two issues with the previous patch that adds active state to the cell icon:
- the previous pressed cell shows active state when another is pressed, can be seen in activities list and in cellrenderericon.py testcase
- sometimes all cells show active state, testcase: go to journal detail view, go back, press an icon
comment:15 Changed 11 years ago by manuq
I have updated the "add active state" patch, issues fixed.
comment:16 Changed 11 years ago by manuq
- Keywords r+ added; r? removed
- Resolution set to fixed
- Status changed from reopened to closed
Pushed after Simon review as toolkit f5b96e1f - 2a76b10c and artwork d23b98c8 .
comment:17 Changed 11 years ago by greenfeld
- Keywords olpc-test-passed added; olpc-test-pending removed
The basic icons in the various sugar views all support short and long taps, and have a light gray background (perhaps too light gray depending on ambient lighting) in Sugar 0.98.2.
Shell patch.