Dear all,

I've been trying to find out why some of my (speed/bit)button's glyphs don't show when I run my application, or after re-loading the project in the IDE.

Turns out, all those that don't display are 22x22 pixels in size and 32 bpp (with transparency). I checked a few other image dimensions, and everything between 19x19 and 23x23 pixels shows the following symptoms:

- when loading the image into the "Glyph" property in the designer using the property editor, the image displays nicely (in the editor as well as on the form)

a speed-button with a red dot as image, transparent "edges"

- when starting the application, the glyph is not visible on the button

a speed button without a glyph

- after closing and re-loading the project in the IDE, the image is not shown on the button, and looks distorted in the property editor

speed button shown in the form designer, no glyph visible vs.

I tested dimensions of AxA with A in [15...25], and everything between 19 and 23 shows that problem (as does 22x15 :-)). Also, the problem exists on Linux x64, Trunk with GTK2 interface. Qt5 and Qt6 show the image on the Form (Designer and App) but not in the property editor (distorted). GTK3 doesn't show the image on the form, but when being run (though in the wrong size). Windows x64 is fine as far as I can see, I currently cannot test Mac.

Note that images without transparency work, but as soon as it contains some transparency I get the error.

24 bit, no transparency, white background; in the designer:

speed button in the form designer, with a red dot and white background

when being run:

speed button, with a red dot and white background


For now, I'll just use different sized image with more transparency around them, or convert them to "use a single color as transparent color" mode, but it's somehow interesting what the cause might be...

I attached a small test project with some test images. The project was created on a HiDPI monitor, but I also saw that problem on "normal" screens, so I don't that should make a difference; but I currently cannot test that as well...

Best regards,

Alex

<<attachment: glyphs.zip>>

-- 
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to