gtk-style-context update



Hi!,

I've recently squashed over the most urgent TODO items in the style
context branch, it's gotten to an state where the core works quite well,
and there's even a clearlooks classic port to its API.

About the branch, the API is prepared as a replacement to GtkStyle, the
next steps to follow would be:

      * Porting widgets to this API, although the detail string
        translation to GtkStyleContext's classes and regions catches the
        most glaring cases, there is room for ugly rendered content, so
        ideally widgets should fully start using its API. From my
        experience this isn't really hard, but not mechanical either, as
        it at least involves GdkColor to GdkRGBA, x/ythickness to
        padding/margin/border-width, fg/bg/text/base to fg/bg,
        style_set() to style_updated() and using common sense to
        translate the detail string to a set of classes as #define'd in
        gtk/gtkstylecontext.h (although a lot may still be missing)
      * For other gnome3 applications, I guess a gnome goal could be set
        so all all apps and libs using GtkStyle move to GtkStyleContext
      * Arguably, another option would be completing the detail string
        catching so porting doesn't have to happen of a sudden, although
        IMHO that's sort of a dead end.

I've also dared and experimented with using GtkStateFlags and
gtk_widget_set_state_flags() to replace gtk_widget_set_state(), as it
feels natural with the rendering API, the relevant commit is
6a981f5070a99aca5ceeb09a3514253ef809da1f, posterior ones replace all
calls to gtk_widget_set_state(), I think get_state() will be mostly
removed if we switch to the rendering API.

As mentioned above, I also got an almost complete Clearlooks classic
port to GtkThemingEngine, the raw patch is at:

  http://lanedo.com/~carlos/clearlooks-style-context.diff

I'll be committing that in a few chunks to a gtk-theme-engine-clearlooks
branch soon.

Andreas Nilsson also started experimenting on the css syntax, trying to
achieve something similar to the gnome3 theme, I think this could be the
start of a gnome3 theme using the CSS syntax.

Although currently not everything can be styled through CSS, a theming
engine would likely have to care only about fancy stuff such as
checkboxes, radiobuttons, striped progressbars or non-obvious animations
(simple color/gradient transition animations are already handled in the
default theme impl)

I think this is it for now...

  Carlos



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