[Patch] TButtonPanel cannot hide glyphs
Original Reporter info from Mantis: biloky @biloky
-
Reporter name: Joeny Ang
Original Reporter info from Mantis: biloky @biloky
- Reporter name: Joeny Ang
Description:
Problems:
- Using the ObjectInspector, clicking on TButtonPanel.ShowGlyphs' members does nothing.
- Assigning values to ShowGlyphs in code multiple times will eventually cause all buttons to lose their glyphs.
Patch:
- Call DoShowGlyphs() when control is showing/hiding to update glyph show status.
- Remove code that re-assign glyphs to internal FGlyphs variable. This will cause a button's empty glyph (hidden state) to be assigned to FGlyph[].
- Win32: In TCustomBitBtn.RealizeKind(), when glyph is determined using LCL (LCLGlyphName), we need to have a valid Glyph. This is needed by TButtonPanel when hiding the buttons' glyph. It does so by calling Glyph.Assign(nil), and if Glyph is already nil, no code is executed and glyph is not hidden.
Tested under GTK2, QT5, Win32
Steps to reproduce:
Test project.
- Using the ObjectInspector, try hiding a button's glyph via the ShowGlyphs property.
- Upon launch, the glyphs should all be hidden.
- Clicking randomly on the 4 buttons multiple times will eventually cause all buttons to lose their glyphs.
Mantis conversion info:
- Mantis ID: 37455
- Build: trunk
- Version: 2.1 (SVN)
- Fixed in revision: 63672 (#0c285d6e)