Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

0001-ActivityIcon-move-the-states-and-drawing-handling-to.patch (5.2 KB) - added by manuq 12 years ago.
Shell patch.
0001-Icon-add-new-class-CanvasIcon-SL-3989.patch (3.6 KB) - added by manuq 12 years ago.
Toolkit patch.
0001-Move-styles-from-SugarActivityIcon-to-SugarCanvasIco.patch (1.5 KB) - added by manuq 12 years ago.
Artwork patch.
0002-Port-icons-in-canvas-from-EventIcon-to-CanvasIcon-fo.patch (8.3 KB) - added by manuq 12 years ago.
Shell second patch.
0001-Remove-unneeded-constants-from-meshbox.py.patch (955 bytes) - added by manuq 12 years ago.
Fixup patch for shell 01
0002-Port-EventPulsingIcon-from-EventIcon-to-CanvasIcon-S.patch (1.6 KB) - added by manuq 12 years ago.
Fixup patch for shell 02 - neighborhood icons
0001-CanvasIcon-check-if-we-have-a-palette-in-the-button-.patch (1.2 KB) - added by manuq 12 years ago.
Fixup patch for toolkit - palette in buddy icon
0002-CanvasIcon-use-set_state_flags-and-unset_state_flags.patch (2.9 KB) - added by manuq 12 years ago.
Fixup for toolkit - use state flags
0001-Network-view-Connect-to-pop-up-and-pop-down-events-w.patch (1.5 KB) - added by manuq 12 years ago.
Fixup for AP icons - connect to palette popup and popdown
0002-Owner-icon-connect-to-palette-pop-up-and-pop-down-ev.patch (1.2 KB) - added by manuq 12 years ago.
Fixup for owner icon - connect to palette popup and popdown
0001-Style-CellRendererIcon-prelight-state-SL-3989.patch (1.2 KB) - added by manuq 12 years ago.
Artwork patch, style CellRendererIcon prelight state
0001-CellRendererIcon-add-prelight-state-and-render-backg.patch (2.8 KB) - added by manuq 12 years ago.
Toolkit patch that adds mouse over feedback to CellRendererIcon
0001-Style-CellRendererIcon-prelight-and-active-state-SL-.patch (1.3 KB) - added by manuq 12 years ago.
New artwork patch (replaces previous) to style prelight and active state of cellrenderer icons.
0002-CellRendererIcon-add-active-state-SL-3989.patch (4.1 KB) - added by manuq 11 years ago.
Toolkit patch to add active state to cellrenderer icons
0003-CellRendererInvoker-remove-duplicate-code-in-CellRen.patch (4.5 KB) - added by manuq 11 years ago.
Patch that removes duplicated code from the CellRendererInvoker.

Download all attachments as: .zip

Change History (33)

Changed 12 years ago by manuq

Toolkit patch.

Changed 12 years ago by manuq

Artwork patch.

Changed 12 years ago by manuq

Shell second patch.

comment:1 Changed 12 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 12 years ago by manuq

First bits pushed.

Changed 12 years ago by manuq

Fixup patch for shell 01

Changed 12 years ago by manuq

Fixup patch for shell 02 - neighborhood icons

Changed 12 years ago by manuq

Fixup patch for toolkit - palette in buddy icon

Changed 12 years ago by manuq

Fixup for toolkit - use state flags

comment:3 Changed 12 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.

Changed 12 years ago by manuq

Fixup for AP icons - connect to palette popup and popdown

Changed 12 years ago by manuq

Fixup for owner icon - connect to palette popup and popdown

comment:4 Changed 12 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 12 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: Changed 12 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: Changed 12 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 12 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 12 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

Changed 12 years ago by manuq

Artwork patch, style CellRendererIcon prelight state

Changed 12 years ago by manuq

Toolkit patch that adds mouse over feedback to CellRendererIcon

comment:10 Changed 12 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 12 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.

http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/palettewindow.py#line1150

Hope this helps.

comment:12 Changed 12 years ago by erikos

  • Priority changed from Unspecified by Maintainer to Urgent

Is important :)

Changed 12 years ago by manuq

New artwork patch (replaces previous) to style prelight and active state of cellrenderer icons.

comment:13 Changed 12 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 12 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

Changed 11 years ago by manuq

Toolkit patch to add active state to cellrenderer icons

Changed 11 years ago by manuq

Patch that removes duplicated code from the CellRendererInvoker.

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.

comment:18 Changed 11 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.