[Solved] How to add High DPI icon set to package? lazarus / 13-General ---------------------------------------------------------------------- lainz · 2017-12-14 14:09 Hi, I noticed that now Lazarus components has 3 png files, one for 100, other for 150 and other for 200. I want to update my packages icons to fit this new way of using package icons, how I can do it? ---------------------------------------------------------------------- wp · 2017-12-14 14:24 You must design the icons in three sizes, 24x24, 32x32 and 48x48. The first one is to be stored under the name of the component as before, the middle one has an appended _150 (for 150%), the last one _200 (200%), e.g. tpanel.png, tpanel_150.png, tpanel_200.png. As an example, just look at folder (lazarus)/images/components. The script which creates the res file for the IDE is (lazarus)/images/components_images.bat, the needed file list is components_images_list.txt ---------------------------------------------------------------------- lainz · 2017-12-14 14:29 Many thanks wp. ---------------------------------------------------------------------- wp · 2017-12-14 15:00 I updated the wiki article http://wiki.lazarus.freepascal.org/How_To_W rite_Lazarus_Component#Step_3:_Create_icons_for_the_package ---------------------------------------------------------------------- guest58172 · 2017-12-14 16:47 Time to add a SVGToolButton, SVGSpeedButton, etc...unfortunately this require to pull a better 2D API (just for this purpose) in each widgetset. ---------------------------------------------------------------------- lainz · 2017-12-14 16:58 Quote from: BBasile on December 14, 2017, 05:47:23 pmTime to add a SVGToolButton, SVGSpeedButton, etc...unfortunately this require to pull a better 2D API (just for this purpose) in each widgetset. Well BGRABitmap handles SVG very well, is not native but it works. An user is adding gradients to it. It's cross platform and solves transparency problems on Linux. In macOS btw there is needed to fix bitmap drawings (any bitmap (TBitmap), not just bgrabitmap) for retina display. Including @2x images OR doubling the width and height of the memory bitmaps when running on retina, so these don't get pixelated. ---------------------------------------------------------------------- guest58172 · 2017-12-14 17:11 Yes, they would have to look native + work out of the box after Laz get setup so for now let's go for icon sets. ---------------------------------------------------------------------- lainz · 2017-12-14 17:26 Quote from: BBasile on December 14, 2017, 06:11:00 pmYes, they would have to look native + work out of the box after Laz get setup so for now let's go for icon sets. In fact to look native is the easy part. These buttons are already custom buttons, that uses "Themes" unit to paint it state, like TSpeedButton for example. And the only thing should be replaced is the bitmap drawing, not so hard. Edit: as you say, must work out of the box, and having a bgrabitmap copy on lazarus has already been discussed on bugtracker and rejected.