implementing pixmap-rendered buttons



Hello,

I am trying to make a button that renders 5 pixmaps
for the button states (inactive, normal, prelit, pressed,
pressed-prelit) which nearly works,
but I cannot turn the relief off in prelit mode because
gtk_button_paint does:

      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?

I earlier wrote a GtkPixmapButton that practically
entirely rewrote button, and I could really just subclass
w/ this bit removed, but it seems like a hack that
might be appropriate in gtk itself.

- Dave Benson

(please cc: me b/c I am not on this list)




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