The initial plan for this week was continue working on kinetic scrolling support for GtkScrolledWindow, however I decided to take a look at the other bugs to give some more time to get review/feedback of the kinetic scrolling work in progress patch.
This looked easier, since it already had a working patch attached to to the bug. I started porting the patch to GTK+ 3 to make it work with current git master. The signal is quite simple, it’s emitted when the mouse button is pressed for a given amount of time. If the mouse pointer is moved (beyond the drag threshold) during the long-press, the operation is cancelled. The tricky part is the animation that should be shown during the long-press to provide visual feedback to the user that something is going to happen when the mouse button is released. The patch, based on hildon code, implemented the animation by changing the current mouse cursor to an animated one. I didn’t like this approach. Talking with Carlos, he suggested to use a transparent popup window with a custom animation similar to the one implemented in the locate pointer plugin of gnome-settings-daemon. I thought we could even leave the animation to the theme engine and implement a popup window that simply calls gtk_render_activity(). So I wrote a new patch that uses the spinner style class to render the animation just to show how it would work. If we agree on this approach we’ll add a new style class and implement a custom animation in the theme engine so that it could be override by themes.
This is a widget already used by empathy, based on hildon code too, to show a search entry when typing on a given widget. It provides both, the UI to show the search entry, and a match function that implements the search algorithm. I think they are actually two different things. The widget that connects to key-press signal on a hook-widget to show an entry is implemented in other places like GtkTreeView, and even for other purposes than searching like the goto window used by evince to jump to a random page in presentation mode. The search algorithm might be used by other applications that use another UI like a find bar or a dialog.
When kinetic scrolling mode is enabled, the scrollbars don’t make sense anymore as a control since the whole view is a scrolling control, however they still make sense as an indicator. HildonPannableArea has its own scrollbars, smaller and without stepper buttons, that are shown when scrolling starts and dissapear (with a fade animation) after a while when the scrolling operation has finished. Playing with the GTK+ theme I realized that we don’t need to implement our own scrollbars, we can just use a custom css to get something similar to the HildonPannableArea scrollbars. The only thing we would need is a way to show/hide the scrollbars that might be just a GtkScrolledWindow style property so that everything depends on the theme.