Re: clickable images with alpha channel
- From: Ian Leonard <ian smallworld cx>
- To: gtk-list gnome org
- Subject: Re: clickable images with alpha channel
- Date: Wed, 07 Jul 2004 08:45:20 +0100
Tim Evans wrote:
Ian Leonard wrote:
Hi,
I am trying to create a map with overlayed images acting as buttons. I
managed to achieve this with 1.2 but am now working with gtk2-2.4.0-1.
I use gtk_image_new_from_file () and put the images in a gtk_fixed
container. So far so good - the images, which are irregular shapes
display correctly, i.e. the background shows through.
Now I need to make them clickable so I put them in an event_box. After
this, they are surrounded by a grey box. It looks like the alpha
rendering has been messed up.
Is this a bug or am I doing this the wrong way?
This is the expected behaviour. A GtkEventBox has a real window behind
it, so it can't be transparent. If you're using gtk+-2.4 then you could
try using gtk_event_box_set_visible_window (eventbox, FALSE).
Thanks for that. It works.
To be picky, it means that the clickable area isn't the same size as the
image. For the user this would be a bit of an oddity, however in my case
it's run from a touchscreen so no one will notice.
--
Ian Leonard
Please ignore spelling and punctuation - I did.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]