On Tue, 29 Mar 2022, Werner Pamler via lazarus wrote:
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%)
So you must always register the three images.
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
Not sure I follow the logic ?
I looked in the WIKI but could not find any relevant info.
https://wiki.lazarus.freepascal.org/How_To_Write_Lazarus_Component#Step_3%3A_Create_icons_for_the_package
Hehe, the history shows you sneaked in the different sizes today.
I checked only last week, so I was pretty sure the info was outdated ;-)
Many thanks !
There is also a short chapter in the Lazarus Handbook vol 2, page 717.
I must be getting old. I edited this book myself :-(
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.
OK, I will look at the SVG files. It didn't occur to me I can remove the
text. Or possibly simply change it to what I need.
Thank you very much !
Michael.
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus