highlighted button with image gives warning



Hi,

I'm trying to get some things done using gtk2. If I create a button
(gtk_button_new()) and I put a GtkImage inside it with
gtk_container_add() (Gtkmage was created using
gtk_image_new_from_pixbuf()) and I go over the button with my mouse (to
click it), I get a warning and the image disappears:

lt-gst-record (pid:16438): Gtk-WARNING **:
gtkstyle.c:1905:gtk_default_render_icon(): invalid icon size `-1'

lt-gst-record (pid:16438): Gtk-CRITICAL **: file gtkstyle.c: line 1790
(gtk_style_render_icon): assertion `pixbuf != NULL' failed

When leaving the button with my mouse, the image re-appears. It seems as
if I need to specify a separate image for the 'highlight' state or tell
it to use the same image for that state, so my question: how do I do
that? Or is this a bug? In gtk1.2, this worked automagically.

Thanks,

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje ronald bitfreak net>
-  // \\   | Running: Linux 2.4.17-XFS and OpenBSD 3.0
- /(   )\  | http://ronald.bitfreak.net/
-  ^^-^^




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