[cairo] GTKCairo development
acjgenius at earthlink.net
Fri Apr 30 13:14:13 PDT 2004
On Fri, 2004-04-30 at 15:49, =?iso-8859-1?Q?=D8yvind_Kol=E5s?= wrote:
> - some way of accessing the current gtk+ theme's colors, (currently
> I have a crude implementation in the gtkcairo_slide demo in
> cairo_set_gtk_color (ct, "base", GTK_STATE_NORMAL);
This is a bad way to go about it. Most themes are per widget dependent,
so you will really want a widget class/name parameter to send with it
otherwise you will usually be wrong, or better yet, a specific style its
being grabbed from. And this doesn't belong in cairo but in the gtk
side, via a get value.
gtk_style_get_color_as_rgb(style, "base",GTK_STATE_NORMAL, &r, &g, &b);
cairo_set_rgb(r, g, b);
also be wary this will not work unless the theme in question SETS all
the colors, which many pixmap themes do not, in those cases this will
almost always result in black.
> the api is in need of a change
> - making the default font in the toy api the same as the current
> gtk+ theme
similar issue to the above, you would use the style to get the pango
font description and convert to set on cairo.
> There are probably more things to be done, but these are what I have
> scheduled to look at when I get the time.
> /Øyvind K.
More information about the cairo