Checkbox and radiobuttons in spkToolbar 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 and radiobuttons of an spkToolbar are drawn too large compared to a standalone TCheckbox if the program in Windows runs at 120 dpi (screen resolution 125% in Windows 7). Moreover, they are pixelated at this resolution giving the application a non-professional appearance.
In Ubuntu, the checkbox and radiobutton of the spkToolbar are drawn way too big and even reach into the controls' captions.
The bug is in SpkGUITools.DrawCheckbox.pas, procedure TGUITools.DrawCheckbox, where the rectangle for the checkbox is calculated form the SystemMetrics of the MenuCheck, not from the size defined by the theme. Another fix has to be applied to TSpkCustomCheckbox.Draw in spkt_Checkboxes, in order to re-center the checkboxes/radiobuttons.
The attached patch fixes the issue.
Steps to reproduce:
- Set your system (Windows!) to 120 dpi, Ubuntu can stay at standard.
- Load the attached demo (see screenshots) into Lazarus.
- Already in the IDE, it can be seen that checkbox and radiobuttons are too large compared to the standalone controls.
- Run the demo --> checkbox and radiobutton in the spkToolbar are pixelated.
Apply attached patch and repeat
--> no more issues.
Mantis conversion info:
- Mantis ID: 26037
- OS: Windows, Ubuntu
- OS Build: Win7, Ubuntu1204
- Monitored by: » @wpam (wp)