Closed pyscripter closed 3 years ago
Just a note that this is a dupe of #84. I've been running this fix for a month with no issues that I've seen.
@MShark67 Yes indeed. I am really sorry I missed that. And my fix is the same as yours.
No worries! Your report may get more attention (and deservedly so, your contributions are always top notch!)
Fixed
Commit https://github.com/SilverpointDev/sptbxlib/commit/4db3ebb80fe48d4a301383bb5e6d781d2fc353e4 broke the painting of dropdown arrows.
To reproduce drop a TSpTBXSubmenuItem on a Toolbar and set its Options to [tboDropdownArrow]. Keep DropDownCombo to False.
This is the part of the code in SpTBXItem.pas that is to blame:
ItemInfo.ComboRect is initialized with the ClientAreRect.
If
then Item.ComboRect still points to the ClientRect and the arrow is centered in that area. And if SpTBXItem has an image the arrow is painted behind the image.
The commit added the
if TextInfo.IsCaptionShown then
statement but did not provide the else part. Before the commit the code was working fine when there is an image but no label.