Re: [gtk-list] Re: implementing pixmap-rendered buttons





On Mon, 1 Nov 1999, Paul Barton-Davis wrote:

> >      if ((button->relief != GTK_RELIEF_NONE) ||
> >	  ((GTK_WIDGET_STATE(widget) != GTK_STATE_NORMAL) &&
> >	   (GTK_WIDGET_STATE(widget) != GTK_STATE_INSENSITIVE)))
> >	gtk_paint_box (widget->style, widget->window,
> >		       GTK_WIDGET_STATE (widget),
> >		       shadow_type, area, widget, "button",
> >		       x, y, width, height);
> >
> >which draws over the pixmaps and looks ugly.
> 
> >Does anybody have a suggestion?
> 
> gtk_button_set_relief() looks like it might do the trick, given the
> first clause of the if(...) statement above.

No, that won't work since it is draw if EITHER condition is
met:  consequence:  GTK_RELIEF_NONE is ignored if !NORMAL and !INSENSITIVE
(e.g. PRELIGHT).

It would all be fine if:

<<<<
      if ((button->relief != GTK_RELIEF_NONE) ||
	  ((GTK_WIDGET_STATE(widget) != GTK_STATE_NORMAL) &&
           (GTK_WIDGET_STATE(widget) != GTK_STATE_PRELIGHT) &&
	   (GTK_WIDGET_STATE(widget) != GTK_STATE_INSENSITIVE)))
	gtk_paint_box (widget->style, widget->window,
====
      if (button->relief != GTK_RELIEF_NONE)
	gtk_paint_box (widget->style, widget->window,
>>>>

Is there no comment from anyone?  This is really impeding
my development...

- Dave



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