Re: Porting a GTK2 theme that relies on the pixmap engine



a word of advice, first: GTK 3.16 (release: February 2015) will not
support new theming engines — the API has been deprecated and it's not
used internally any more. the CSS machinery is now capable of doing
all that theme engines can do, unless they abuse the API to do things
that were *explicitly* disallowed, like retrieving the GtkWidget being
drawn. my suggestion is to rewrite the theme using CSS.

in general, though, GdkPixmap was replaced by cairo surfaces; all
cairo drawing on X11 happens on a cairo surface backed by a Pixmap,
and if you have a Pixmap that is used to store all the theme elements
like a texture atlas (like the old Nokia internet tablets did, back in
the day) then you can easily use cairo to draw regions of that pixmap
on the cairo context provided to the theme engine API when it's asked
to draw something with the given GtkStyleContext.

again, though: my strong suggestion is to rewrite the theme using CSS.
you'll find that it's easier to develop, test, and deploy than an
actual shared library that gets loaded at run time.

ciao,
 Emmanuele.


On 7 November 2014 18:34, chris chriswareham net <chris chriswareham net> wrote:
Hi,

I'm trying to port a GTK2 theme to GTK3. It relies heavily on the pixmap engine,
and was wondering how to replicate the same styling in GTK3 (using the pixbuf
engine?). If anyone can help, then I can post a few representative image
definitions from the GTK2 style.

Cheers,

Chris
_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list



-- 
http://www.bassi.io
[ ] ebassi [ gmail com]


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