TSpeedButton glyph drawing errors
Original Reporter info from Mantis: Hansi
-
Reporter name: Hansi
Original Reporter info from Mantis: Hansi
- Reporter name: Hansi
Description:
Since the update to Lazarus 1.2 (Debian package 1.2+dfsg-1) one of my old projects shows a problem with TSpeedButtons.
The LFM file says "LCLVersion = '1.2.0.3'". According to "svn diff" the previous version was "LCLVersion = '0.9.30.4'" for which the TSpeedButtons worked perfectly. I didn't recompile this project with any Lazarus versions in between.
The problem is that the glyphs are not drawn during runtime and it seems they are stored improperly in the LFM files.
Steps to reproduce:
- create a new project.
- add one TSpeedButton to the form
- set the property "Flat" to "true"
- select the "Glyph" property, click the "..." button, click the "Load" button, then select e.g. a PNG file, then click Ok, click Ok once more in the image loading dialog
- during design time the glyph is drawn properly
- now compile, execute the program (I executed it from a terminal, not within Lazarus, but this shouldn't make any difference)
- during run time the glyph is not drawn
Now close the project and open it again.
- now during design time the glyph is also not drawn or drawn incorrectly.
- click on the TSpeedButton, select the "Glyph" property and click the "..." button
- the image load dialog shows a the image incorrectly
Additional information:
In my bigger project, selecting a glyph does also draw it during design time. But it is not drawn centered but shifted by approx. 1/2 of the speed button size. This shift changed when I changed the "Layout" property.
the problem also exists with XPM images
please find attached a small example project with one of my PNG images
Mantis conversion info:
- Mantis ID: 26093
- OS: Linux
- OS Build: Debian sid
- Build: SVN-Rev 43696
- Platform: AMD64
- Version: 1.2.0