Non transparent toolbar icons

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Non transparent toolbar icons

Udo Schneider
All,

I am having an issue (again) with non-transparent toolbar icons
(http://www.krodelin.net/toolbar.jpg). I had this fixed in my previous
working image but can't find/remeber how to fix it.

Any pointers?

CU,

Udo


Reply | Threaded
Open this post in threaded view
|

Re: Non transparent toolbar icons

Sebastián Sastre
Udo,

 the transparence in toobars is archieved by using an indexed 256 color
bitmap wich has a grey color that dolphin interprets as being
transparent. The only thing you need is to get some model of a bitmap
wich has that color, so you can pick it with a bitmap editor and paint
the icons backgound.

 hope this helps,

Sebastian


Reply | Threaded
Open this post in threaded view
|

Re: Non transparent toolbar icons

Udo Schneider
Hi Sebastián,

In applications I wrote on my own I normaly use that approach which
works fine. However this is only is used if you are using regular
ToolbarButtons which do reference a bitmap where transparent parts
should be (Color face3d) RGB192/192/192.

If you are using ToolbarIconButtons should simply be able to supply an
Icon (which gets painted to a Color face3d background behind the
scenes). But this doesn't seem to work here. And I'm not speaking about
my own application but about the IDE as well.

I somehow solved this problem (see other post) by patching
ToolbarIconButton>>renderBitmap.

The original code creates a bitmap which gets filled with Color face3d
as compatible bitmap (based on the current display).
I'm creating the bitmap with a depth of 32 regardingless of the Display.
This works as long as the current display device is really 32bpp.

However if I compare the Bitmap created as compatible bitmap and my own
bitmap they both have 32bpp ... It's just that the compatible bitmap
doesn't work whereas mine does .....

I hope this makes sense.

CU,

Udo



  wrote:

> Udo,
>
>  the transparence in toobars is archieved by using an indexed 256 color
> bitmap wich has a grey color that dolphin interprets as being
> transparent. The only thing you need is to get some model of a bitmap
> wich has that color, so you can pick it with a bitmap editor and paint
> the icons backgound.
>
>  hope this helps,
>
> Sebastian
>