[Lazarus] Component icons howto ?
werner.pamler at freenet.de
Tue Mar 29 18:05:01 CEST 2022
Am 29.03.2022 um 15:50 schrieb Michael Van Canneyt via lazarus:
> I see there are 3 icons for every standard component:
> mycomponent, mycomponent_150 and mycomponent_200
> How does the IDE pick which image it needs ?
The basic image name must match the component name (including the "T").
The image without an appendix is used for standard resolution (96 ppi,
100%), the image with appendix "_150" is used for 144 ppi (150%), and
the image with appendix "_200" is used for 192 ppi (200%)
> As a corollary: what's with the strange names ?
> Why not use the size of the icon in the name, that would be a lot
> clearer IMHO?
That's the way it was decided. One advantage is that when images are
needed for other purposes, but at different sizes (e.g. the icons in the
message window which are much smaller) the scaling procedure can still
be the same
> I looked in the WIKI but could not find any relevant info.
There is also a short chapter in the Lazarus Handbook vol 2, page 717.
> 2. I would like to create icons for some new dataset descendents.
> The icons for the well-known datasets all have a text on it.
> Where can I find the icon without a text on it ?
Roland Hahn, who designed most of the new icons, recommends to paint the
images in svg format (using InkScape for example). For there you can
export the required images in any size as png. He does create three
differently sized svg images for fine-tuning, but in my own work I
usually draw only one size, e.g 36x36.
You can find the svg source files from which all (well - most) of our
images are created on CCR (folder "image_sources"). The TDbf database
icons, for example, are located in
(ccr)/image_sources/lazarus/components/tdbf etc (like in the IDE
folder). From there you can delete or edit the text overlays.
More information about the lazarus