[104] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Frame around the pixmap in button and color

daemon@ATHENA.MIT.EDU (Otto Hammersmith)
Tue May 13 11:03:49 1997

Date: Tue, 13 May 1997 10:42:23 -0400
From: Otto Hammersmith <otto@redhat.com>
To: gtk-list@redhat.com
In-Reply-To: <199705131354.IAA31925@nuclecu.unam.mx>; from Federico Mena on Tue, May 13, 1997 at 08:54:57AM -0500
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

On Tue, May 13, 1997 at 08:54:57AM -0500, Federico Mena wrote:
> >  Yes. I found this notation in one of the xpm files that came with
> >  bmpbrowser which I installed a few hours ago. But that does the job
> >  only half. The background of the xpm is as gray as the button but
> >  when you place the mouse over the button the parts which should be
> >  transparent do not become bright, but stay in the normal gray.
> 
> There's a very good example of how to use pixmaps in buttons in
> gtk/testgtk.c.  Look at the create_pixmap() function; the relevant
> part is around line 540.  You have to create separate GdkPixmaps for
> each of the possible states of the button, and later you squish them
> together into a pixmap widget.
> 
>   Quartic

You're right, but there is still yet another problem with transparent
pixmaps... :(

If the underlying background is another pixmap, things are not handled
properly.  Maybe I'm just not sure how to make it work properly, but I
don't see how.  (I even tried using gtk_widget_set_style to make sure
that the pixmap was getting the same style as the button, which does
have the proper pixmap background, but that didn't work)

Personally, I don't think it's much of a problem... I don't care for
pixmap backgrounds anyway, but I'm sure it will have ramifications on
gzilla and the gtk-based-rxvt-replacement-with-pixmap-backrounds. (you
know -someone- is going to do it, no matter how sickening it might be :)

-- 
					-Otto.

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post