Re: Notes and thoughts on the GTK+ meeting at GUADEC

On Fri, 2009-08-14 at 12:40 +0100, Alberto Ruiz wrote:
> As for theming, I've been discussing a bit with Thomas, Carlos and
> Cody. We have reached some sort of consensus that a backwards
> compatible path is possible adding a second vtable for engines,
> checking the vtable size and working out a structured way to poke the
> scene graph representation. However, we need time to try these things
> out. Thomas pointed out that working on a separate theming library
> makes a lot of sense as it would allow reaching a nice API and it
> would help the special purpose GObject baed toolkits around to have
> proper theming as well (say Nbtk, Glitter...).

I've been looking into this in further detail recently, collecting
opinions and ideas on API and even started some coding. This takes the
form of a new toolkit independent widget drawing library, much like Owen
suggested in previous discussions. I've been collecting the results of
my discussions and thoughts on a wiki page:

> So I think that we've reached the conclusion that theming shouldn't
> get in the way of the current 3.0 plans, as we don't have time to
> deprecate GtkStyle and introduce something new all at once
> (eventhough, we all would have loved to make it).

As I started out trying to convert the GtkStyle API to cairo (there is a
patch in bugzilla), but it quickly become clear that any changes to
GtkStyle are going to have to be done either very very gradually, or we
plan a migration path that takes effect during the stable cycle.
GtkStyle simply affects too much to make any changes managable in a the
current time frame and resources.

> There's the issue of CSS though. Would it be acceptable to deprecate
> gtkrc's in the middle of the 3.0 cycle in favor of CSS theming files?
> This is an area where I'm pretty much blind, prolly Robert Staudinger
> has a better picture than me here, Robert?

My experience with using CSS in NBTK (a clutter based UI toolkit we are
using for Moblin) is that there are advantages and disadvantages. There
are some quite serious limitations, such as the lack of selectors based
on class hierarchy. One also has to consider that CSS itself does not
provide any drawing capabilities (I am aware of efforts to provide this,
but I am not yet convinced on their long term suitability). However,
there is certainly a lot we can take from its design and I've
incorporated much of that into my own design.

For immediate compatibility, it would be possible (and in fact, I have
planned) to create a "compatibility engine" that links to the new widget
drawing library. If this is successful and is adopted by GNOME for
example, then I would hope non-GTK+ applications such as OpenOffice and
Firefox would begin using it rather than attempting the horrible hacks
they do now to get a GTK+ look and feel.

I'd like to know what thoughts people have on a migration plan for GTK+
that involves moving to a new widget drawing library during the 3.0



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]