how to import an icon

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

how to import an icon

Torsten Bergmann
If you want to have own icons in OB Browser then
you can easily use:

| image stream |
image := ColorForm fromFileNamed: '/path/to/icon.gif'.
stream := WriteStream with: String new.
image storeOn: stream.
stream contents inspect

to get the form and put the generated code as an extension method on
class OBMorphicIcons to implement #browserIcon returning the selector
in your own class. Typical icon size in OB is 12x12 (*).

See Exception class>browserIcon and OBMorphicIcons>>exception
for an example in a dev-image.


* I dont like the small 12x12 size since typical icons size
  on Win for small icons is 16x16 - but one can use the free
  IconFX tool to smoothly shrink them

Bye
T.










--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how to import an icon

Tudor Girba
Thanks for the hints.

Cheers,
Doru


On 11 Jan 2010, at 18:36, Torsten Bergmann wrote:

> If you want to have own icons in OB Browser then
> you can easily use:
>
> | image stream |
> image := ColorForm fromFileNamed: '/path/to/icon.gif'.
> stream := WriteStream with: String new.
> image storeOn: stream.
> stream contents inspect
>
> to get the form and put the generated code as an extension method on
> class OBMorphicIcons to implement #browserIcon returning the selector
> in your own class. Typical icon size in OB is 12x12 (*).
>
> See Exception class>browserIcon and OBMorphicIcons>>exception
> for an example in a dev-image.
>
>
> * I dont like the small 12x12 size since typical icons size
>  on Win for small icons is 16x16 - but one can use the free
>  IconFX tool to smoothly shrink them
>
> Bye
> T.
>
>
>
>
>
>
>
>
>
>
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

--
www.tudorgirba.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project