Re: gtk-style-context has landed

On Tue, 2010-12-07 at 17:32 +0100, Murray Cumming wrote:
> I'm wondering how code such as this should be ported (I'm porting a
> similar gtkmm example):
> The old gtk_paint_*(GtkStyle*,) functions took a GtkStateType parameter,
> which is presumably deprecated in favour of GtkStateFlags, though that's
> not documented.

Yep. I actually went through the gtk_paint_* code to find the
equivalences between GtkStateType and GtkStateFlags.

> But the new gtk_render_*(GtkStyleContext*, ) functions don't have a
> state parameter, because GtkStyleContext has a state instead. But then
> what happens to the state logic in that code?

>From memory:
gtk_style_context_save (ctx);
gtk_style_context_set_state (ctx, your_calculated_state);
gtk_style_context_restore (ctx);

This is a small example:

> >       * Apps are encouraged to switch, I guess a GNOME goal should be
> >         set up to handle this, Javier? :)
> > 
> > I'll be handling these items during the next days, helping hands are of
> > course welcome.

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