Dublin Theming hackfest

So, today is officially the last day for the hackfest, it’s been a quite exciting week, with lots of discussions, ideas flowing around and crazy experiments, which had lead us to an agreement on how should a new theming infrastructure be.

People here have been working really hard to get different parts of the lower level infrastructure right, such as CSS theming, the GStylable interface, hit detection for non-rectangular shapes, etc… I’ve been mostly focusing on the replacement for GtkStyle, this is what has been achieved so far in that field:

  1. Current API limitations: GtkStyleContext would be able to store any kind of data, it’s kind of a hashtable with save/restore habilities, being able to store much more information that could be relevant to engines (goodbye detail string! goodbye widget peeping!), All drawing would be done on top of cairo, one important detail is that the engine wouldn’t get even get the widget pointer (quite necessary for third-party projects using GTK+ theming)
  2. Animations: These are focused to state changes and are mostly implicit if they affect the whole widget. The style context has to be told if they affect part of the widget though (a checkbox in a cellrenderer, for example). There can also be several animations for different state transitions running at the same time:

  3. Parallel prelight and checkbox animations running, slowed down for appreciation. Glitches will be fixed by correct properties inheritance

  4. Containers are able to pass placing information to children’s context: Think comboboxes, spinbuttons, notebook tabs, … Now painted elements can get a clue about how do they connect visually with other nearby/related elements. Of course engine implementations will be able to just ignore this information.

  5. Rounded pathbar

Nevermind the ugly rendered elements, that’s up to artists :). The code is in my github repo, in case anybody wants to give it a try.

Getting ready for the theming hackfest

There’s now just less than a week left for the theming hackfest! I’m quite looking forward for what may happen there, it looks really promising.

So, out of excitement, I’ve began dumping some ideas into a GTK+ git repo. Of course, this is just proof-of-concept code, years light from finished, etc… but hopefully it will help make further ideas start flowing :)

And now a meaningless screenshot!

(source code)

This is 9 separate boxes painted through the new API, it would allow containers to hand their children information about the placing context in a group, so the engine could know how to connect elements together. GtkStyleContext could contain any data, so it’s fully extensible.