Checkmark in TCheckListBox pixelated at 120 ppi
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
The checkboxes embedded into a TCheckListbox are drawn too large compared to a standalone TCheckbox if the program runs at 120 dpi (screen resolution 125% in Windows 7). What is even more disturbing is that the checkmarks of the listbox are pixelated at this resolution giving the application a non-professional appearance.
The bug is in Win32WSCheckLst.pp, procedure TWin32WSCustomCheckListBox.DefaultWndHandler, where the rectangle for the checkbox is calculated form the size of the listbox item, not from the size defined by the theme.
The attached patch fixes the issue.
Steps to reproduce:
- Set your system (Windows!) to 125 dpi.
- Create a new form
- Add a TChecklistbox and a TCheckbox for comparison --> the checkboxes in the listbox are larger than the standalone checkbox
- Add text to the listbox
- Or: load attached demo
- Run the program and check an item in the listbox
--> the checkmark in the listbox is pixelated
Apply attached patch and repeat
--> no more issues.
Mantis conversion info:
- Mantis ID: 26036
- OS: Windows
- OS Build: Win 7
- Platform: x86, x64
- Version: 1.3 (SVN)
- Fixed in revision: 44751 (#4ba35680)